From d8ac6057eaad648687699e25a575f3b7b8c1b102 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期五, 17 十一月 2023 18:52:19 +0800 Subject: [PATCH] modified: src/views/plan/customerorder/schedule-table.vue --- src/views/plan/customerorder/sample-customerorder-form.vue | 52 ++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue index 244ede5..151083b 100644 --- a/src/views/plan/customerorder/sample-customerorder-form.vue +++ b/src/views/plan/customerorder/sample-customerorder-form.vue @@ -68,8 +68,8 @@ <el-row> <el-col :span="6"> <el-form-item label="涓氬姟鍛�" prop="salesMan"> - <el-select @change="selsctionSales" v-model="salesSelectData" style="width:100%"> - <el-option v-for="(item,index) in staffOptions" :key="index" :value="item" :label="item.staffName"/> + <el-select @change="selsctionSales" filterable v-model="salesSelectData" style="width:100%"> + <el-option v-for="(item,index) in staffOptions" :key="index" :value="item.staffNo+','+item.staffName" :label="item.staffName"/> </el-select> </el-form-item> </el-col> @@ -174,7 +174,7 @@ </el-select> </template> <template slot="menu" slot-scope="scope"> - <el-button type="text" icon="el-icon-circle-close" :disabled="tableData.length<2" @click="delRow(scope.row,scope.$index)">鍙栨秷</el-button> + <el-button type="text" icon="el-icon-circle-close" :disabled="tableData.length<2" @click="delRow(scope.row,scope.index)">鍙栨秷</el-button> </template> </avue-crud> </div> @@ -391,12 +391,32 @@ import PartDialog from '@/views/common/part.vue' import { validateSixDecimal } from '@/util/validate' import {dateFormat} from '@/util/date' -// import { chooseStaff } from '@/api/admin/productType' +import { chooseStaff } from '@/api/plan/customerorder' import { tableOption } from '@/const/crud/customerOrder/customerOrderForm' export default { components: { PartDialog + }, + watch:{ + visible(newVal){ + if(!newVal){ + this.tableData = [{ + "$cellEdit": true, + "$index": 0, + "partNo": "", + "specs": "", + "manufactureAttr": "", + "productName": "", + "productType": "", + "otcUnit": "", + "buyQtyDue": "", + "shippingAddress": "", + "remark": "", + "isTrusted": true + }] + } + } }, data() { return { @@ -456,13 +476,16 @@ this.tableData.splice(index,1) }, selsctionSales(data){ - this.dataForm.salesMan = data.staffName - this.dataForm.salerWorkCode = data.staffNo + if(data){ + let arr = data.split(",") + this.dataForm.salesMan = arr[1] + this.dataForm.salerWorkCode = arr[0] + } }, getStaffOptions(){ - // chooseStaff().then((response)=>{ - // this.staffOptions = response.data.data - // }) + chooseStaff().then((response)=>{ + this.staffOptions = response.data.data + }) }, init(id) { this.initDataForm() @@ -528,12 +551,16 @@ this.showPart = true }, selectPart(part) { - console.log(part); const index = this.currentSelectRow if (part) { + this.tableData[index].partId=part.id this.tableData[index].partNo = part.partNo this.tableData[index].customerPartSpec = part.specs this.tableData[index].productName = part.partName + this.tableData[index].otcUnit = part.unit + this.tableData[index].buyQtyDue = part.numCount + this.tableData[index].manufactureAttr = part.materialAttribute + } }, // 鍏ㄥ睆 @@ -581,4 +608,9 @@ color: #c0c4cc; margin: -1px 0; } +.avue-crud .avue-crud__left .el-button{ + margin-right: 8px; + margin-bottom: 8px; + border-radius: 0px; +} </style> \ No newline at end of file -- Gitblit v1.9.3