|
@@ -274,13 +274,7 @@
|
|
|
max-height="400"
|
|
|
>
|
|
|
<el-table-column align="center" label="序号" type="index" width="50" />
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="销售类型"
|
|
|
- prop="saleTypeName"
|
|
|
- min-width="120"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
v-if="listItem"
|
|
@@ -296,13 +290,7 @@
|
|
|
<div v-else>{{ scope.row.saleTypeName }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="物料编码"
|
|
|
- prop="materialNumber"
|
|
|
- min-width="120"
|
|
|
- show-overflow-tooltip
|
|
|
- />
|
|
|
+ <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="产品编码"
|
|
@@ -310,20 +298,8 @@
|
|
|
min-width="120"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="产品名称"
|
|
|
- prop="materialName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="规格型号"
|
|
|
- prop="specification"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
|
|
|
+ <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-if="listItem" v-model="scope.row.specification" size="mini" />
|
|
|
<div v-else>{{ scope.row.specification }}</div>
|
|
@@ -921,7 +897,7 @@ export default {
|
|
|
|
|
|
// 获取商品列表
|
|
|
getGoodsList() {
|
|
|
- console.log(this.goodsList,"000")
|
|
|
+ console.log(this.goodsList, '000')
|
|
|
getRetailProductList({
|
|
|
pageNum: this.currentPage,
|
|
|
pageSize: 10,
|
|
@@ -940,7 +916,9 @@ export default {
|
|
|
const oldItem = oldGoodsList[i]
|
|
|
for (let j = 0; j < newGoodsList.length; j++) {
|
|
|
const newItem = newGoodsList[j]
|
|
|
- if (`${newItem.materialNumber}_${newItem.saleTypeId}` === `${oldItem.materialNumber}_${oldItem.saleTypeId}`) {
|
|
|
+ if (
|
|
|
+ `${newItem.materialNumber}_${newItem.saleTypeId}` === `${oldItem.materialNumber}_${oldItem.saleTypeId}`
|
|
|
+ ) {
|
|
|
newGoodsList[j].selected = true
|
|
|
break
|
|
|
}
|
|
@@ -1115,18 +1093,15 @@ export default {
|
|
|
this.$refs.mainForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
for (let i = 0; i < this.goodsList.length; i++) {
|
|
|
- if (!this.goodsList[i].saleTypeId) {
|
|
|
+ if (!this.goodsList[i]?.saleTypeId) {
|
|
|
this.$errorMsg('请选择销售类型')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- console.log(this.goodsList[i].qty)
|
|
|
- if (this.goodsList[i].qty == null || this.goodsList[i].qty === '' || Number(this.goodsList[i].qty) < 0) {
|
|
|
+ if (this.goodsList[i]?.qty == null || this.goodsList[i]?.qty === '' || Number(this.goodsList[i]?.qty) < 0) {
|
|
|
this.$errorMsg('数量不能为空或者小于0')
|
|
|
-
|
|
|
return
|
|
|
}
|
|
|
- if (!this.goodsList[i].materialNumber) {
|
|
|
+ if (!this.goodsList[i]?.materialNumber) {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -1155,7 +1130,7 @@ export default {
|
|
|
linkman: this.mainForm.linkman,
|
|
|
phone: this.mainForm.phone,
|
|
|
serviceId: this.mainForm.salesMan,
|
|
|
- serviceName: saleManItem.nickName,
|
|
|
+ serviceName: saleManItem?.nickName || '',
|
|
|
tel: this.mainForm.tel,
|
|
|
remark: this.mainForm.remark,
|
|
|
contractExpireDate: this.mainForm.contractDate,
|