|
@@ -4,13 +4,8 @@
|
|
|
<el-col :span="18" :xs="24">
|
|
|
<div style="width: 100%" class="verticle-view">
|
|
|
|
|
|
- <el-table :data="orderClothItemVOS" highlight-current-row @cell-click="onOrderClothItemSelect">
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- type="index"
|
|
|
- align="center"
|
|
|
- fixed="left"
|
|
|
- width="80">
|
|
|
+ <el-table :data="orderClothItemVOS" fit highlight-current-row border stripe @cell-click="onOrderClothItemSelect">
|
|
|
+ <el-table-column label="序号" type="index" align="center" fixed="left" width="80">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="衣服条码" align="center" prop="name" width="200">
|
|
|
<template slot-scope="scope">
|
|
@@ -38,23 +33,15 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span>
|
|
|
<template v-for="(item,index) in scope.row.orderClothFlaws">
|
|
|
- {{index == 0?item.clothFlawName:(',' + item.clothFlawName)}}
|
|
|
- </template>
|
|
|
+ {{index == 0?item.clothFlawName:(',' + item.clothFlawName)}}
|
|
|
+ </template>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
-
|
|
|
- type="text"
|
|
|
- @click="rollbackOrderClothItem(scope.$index,scope.row.washCode)"
|
|
|
- >删除</el-button>
|
|
|
- <el-button
|
|
|
-
|
|
|
- type="text"
|
|
|
- @click="selectClothWashProblems(scope.$index)"
|
|
|
- >问题</el-button>
|
|
|
+ <el-button type="text" @click="rollbackOrderClothItem(scope.$index,scope.row.washCode)">删除</el-button>
|
|
|
+ <el-button type="text" @click="selectClothWashProblems(scope.$index)">问题</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -68,20 +55,15 @@
|
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="40px">
|
|
|
<el-form-item label="条码" prop="washCode">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.washCode"
|
|
|
- placeholder="请输入条码"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="searchCloth"
|
|
|
- />
|
|
|
+ <el-input v-model="queryParams.washCode" placeholder="请输入条码" clearable @keyup.enter.native="searchCloth" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="searchCloth">查询</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="searchCloth">查询</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<el-descriptions title="衣物信息" :column="1">
|
|
|
- <el-descriptions-item label="衣物条码" >{{orderClothItemVO?orderClothItemVO.washCode:''}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="衣物条码">{{orderClothItemVO?orderClothItemVO.washCode:''}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="衣物名称">{{orderClothItemVO?orderClothItemVO.clothItemName:''}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="颜色">
|
|
|
<template v-if="orderClothItemVO">
|
|
@@ -116,33 +98,28 @@
|
|
|
<template v-if="orderClothItemVO">
|
|
|
<span style="color: red">
|
|
|
<template v-if="orderClothItemVO.flowStatus == 0">
|
|
|
- 待入场
|
|
|
- </template>
|
|
|
- <template v-if="orderClothItemVO.flowStatus == 1">
|
|
|
- 已入厂
|
|
|
- </template>
|
|
|
- <template v-if="orderClothItemVO.flowStatus == 2">
|
|
|
- 已检查
|
|
|
- </template>
|
|
|
- <template v-if="orderClothItemVO.flowStatus == 3">
|
|
|
- 已出厂
|
|
|
- </template>
|
|
|
+ 待入场
|
|
|
+ </template>
|
|
|
+ <template v-if="orderClothItemVO.flowStatus == 1">
|
|
|
+ 已入厂
|
|
|
+ </template>
|
|
|
+ <template v-if="orderClothItemVO.flowStatus == 2">
|
|
|
+ 已检查
|
|
|
+ </template>
|
|
|
+ <template v-if="orderClothItemVO.flowStatus == 3">
|
|
|
+ 已出厂
|
|
|
+ </template>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
|
|
|
- <el-button type="primary" icon="el-icon-s-order" @click="showClothItemDetail">详情</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-s-order" @click="showClothItemDetail">详情</el-button>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="入厂信息"
|
|
|
- :visible.sync="clothItemDetailOpen"
|
|
|
- width="50%"
|
|
|
- :before-close="handleClose"
|
|
|
- center>
|
|
|
+ <el-dialog title="入厂信息" :visible.sync="clothItemDetailOpen" width="50%" :before-close="handleClose" center>
|
|
|
<el-descriptions :column="3">
|
|
|
<el-descriptions-item label="衣物条码" :span="3">{{orderClothItemVO?orderClothItemVO.washCode:''}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="衣物名称" :span="3">{{orderClothItemVO?orderClothItemVO.clothItemName:''}}</el-descriptions-item>
|
|
@@ -184,65 +161,53 @@
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="衣服问题"
|
|
|
- :visible.sync="selectClothWashProblemOpen"
|
|
|
- width="50%"
|
|
|
- :before-close="handleClose"
|
|
|
- center>
|
|
|
- <el-row :gutter="15">
|
|
|
- <el-form size="small" label-width="120px">
|
|
|
+ <el-dialog title="衣服问题" :visible.sync="selectClothWashProblemOpen" width="50%" :before-close="handleClose" center>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-form size="small" label-width="120px">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="检查的问题" prop="washCode">
|
|
|
- <el-input
|
|
|
- v-model="clothProblemContent"
|
|
|
- placeholder="请输入检查的问题"
|
|
|
- type="textarea"
|
|
|
- :rows="5"
|
|
|
- maxlength="500"
|
|
|
- show-word-limit
|
|
|
- :style="{width: '100%'}"
|
|
|
- />
|
|
|
+ <el-input v-model="clothProblemContent" placeholder="请输入检查的问题" type="textarea" :rows="5" maxlength="500" show-word-limit
|
|
|
+ :style="{width: '100%'}" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-table :data="washProblems" style="width: 100%" max-height="400" highlight-current-row @cell-dblclick="addSelectWashProblem">
|
|
|
- <el-table-column label="问题" align="center" prop="content"/>
|
|
|
+ <el-table-column label="问题" align="center" prop="content" />
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="selectClothWashProblemOpen = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="saveWashProblem">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <el-button @click="selectClothWashProblemOpen = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveWashProblem">确 定</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {inFactory,deleteInFactory,setClothProblem} from "../../../api/order/clothItem";
|
|
|
-import {allWashProblem} from "@/api/cloth/washProblem";
|
|
|
+import { inFactory, deleteInFactory, setClothProblem } from "../../../api/order/clothItem";
|
|
|
+import { allWashProblem } from "@/api/cloth/washProblem";
|
|
|
import order from "@/views/recharge/order/index.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "InFactory",
|
|
|
computed: {
|
|
|
},
|
|
|
- dicts: ['sys_yes_no','cloth_type','cloth_send_type'],
|
|
|
- data(){
|
|
|
+ dicts: ['sys_yes_no', 'cloth_type', 'cloth_send_type'],
|
|
|
+ data() {
|
|
|
return {
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
},
|
|
|
- orderClothItemVO:null,
|
|
|
- orderClothItemVOS:[],
|
|
|
- clothItemDetailOpen:false,
|
|
|
- washProblems:[],
|
|
|
- selectClothWashProblemOpen:false,
|
|
|
- selectClothItemIndex:null,
|
|
|
- clothProblemContent:'',
|
|
|
+ orderClothItemVO: null,
|
|
|
+ orderClothItemVOS: [],
|
|
|
+ clothItemDetailOpen: false,
|
|
|
+ washProblems: [],
|
|
|
+ selectClothWashProblemOpen: false,
|
|
|
+ selectClothItemIndex: null,
|
|
|
+ clothProblemContent: '',
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -250,9 +215,9 @@ export default {
|
|
|
this.washProblems = res.data
|
|
|
})
|
|
|
},
|
|
|
- methods:{
|
|
|
- searchCloth(){
|
|
|
- if(this.isEmpty(this.queryParams.washCode)){
|
|
|
+ methods: {
|
|
|
+ searchCloth() {
|
|
|
+ if (this.isEmpty(this.queryParams.washCode)) {
|
|
|
this.$message.error('请先输入衣服条码')
|
|
|
return
|
|
|
}
|
|
@@ -261,7 +226,7 @@ export default {
|
|
|
this.orderClothItemVOS.push(res.data)
|
|
|
})
|
|
|
},
|
|
|
- showClothItemDetail(){
|
|
|
+ showClothItemDetail() {
|
|
|
this.clothItemDetailOpen = true
|
|
|
},
|
|
|
handleClose(done) {
|
|
@@ -269,41 +234,41 @@ export default {
|
|
|
.then(_ => {
|
|
|
done();
|
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
+ .catch(_ => { });
|
|
|
},
|
|
|
- rollbackOrderClothItem(index,washCode){
|
|
|
+ rollbackOrderClothItem(index, washCode) {
|
|
|
this.$confirm('确定要删除这条入厂记录吗?')
|
|
|
.then(_ => {
|
|
|
- deleteInFactory({washCode:washCode}).then(res => {
|
|
|
- this.orderClothItemVOS.splice(index,1)
|
|
|
+ deleteInFactory({ washCode: washCode }).then(res => {
|
|
|
+ this.orderClothItemVOS.splice(index, 1)
|
|
|
})
|
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
+ .catch(_ => { });
|
|
|
|
|
|
},
|
|
|
- selectClothWashProblems(index){
|
|
|
+ selectClothWashProblems(index) {
|
|
|
this.selectClothItemIndex = index
|
|
|
this.clothProblemContent = this.orderClothItemVOS[index].clothProblem
|
|
|
this.selectClothWashProblemOpen = true
|
|
|
|
|
|
},
|
|
|
- addSelectWashProblem(row, column, cell, event){
|
|
|
- if(this.clothProblemContent == null){
|
|
|
+ addSelectWashProblem(row, column, cell, event) {
|
|
|
+ if (this.clothProblemContent == null) {
|
|
|
this.clothProblemContent = ''
|
|
|
}
|
|
|
- if(!this.isEmpty(this.clothProblemContent)){
|
|
|
+ if (!this.isEmpty(this.clothProblemContent)) {
|
|
|
this.clothProblemContent += ','
|
|
|
}
|
|
|
this.clothProblemContent += row.content
|
|
|
},
|
|
|
- saveWashProblem(){
|
|
|
- setClothProblem({id:this.orderClothItemVOS[this.selectClothItemIndex].id,clothProblem:this.clothProblemContent}).then(res => {
|
|
|
+ saveWashProblem() {
|
|
|
+ setClothProblem({ id: this.orderClothItemVOS[this.selectClothItemIndex].id, clothProblem: this.clothProblemContent }).then(res => {
|
|
|
this.orderClothItemVOS[this.selectClothItemIndex].clothProblem = this.clothProblemContent
|
|
|
this.selectClothWashProblemOpen = false
|
|
|
this.$message.success('设置成功')
|
|
|
})
|
|
|
},
|
|
|
- onOrderClothItemSelect(row){
|
|
|
+ onOrderClothItemSelect(row) {
|
|
|
this.orderClothItemVO = row
|
|
|
this.queryParams.washCode = this.orderClothItemVO.washCode
|
|
|
}
|
|
@@ -312,5 +277,4 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|