|
@@ -77,7 +77,14 @@
|
|
|
<div class="table" style="margin-top: 20px">
|
|
|
<el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
|
<el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
- <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="140" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)" v-if="listItem">
|
|
|
+ <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <div v-else>{{scope.row.saleTypeName}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
@@ -423,6 +430,7 @@ export default {
|
|
|
await this.getSalesmanList();
|
|
|
this.getDictList();
|
|
|
this.getWarehouseList();
|
|
|
+ this.getSalesTypeList();
|
|
|
if(this.listItem) {
|
|
|
this.isFirst = true;
|
|
|
this.getDetail();
|
|
@@ -555,7 +563,6 @@ export default {
|
|
|
|
|
|
// 点击 选择商品
|
|
|
openDialog() {
|
|
|
- this.getSalesTypeList();
|
|
|
this.isShowDialog = true;
|
|
|
// if(this.mainForm.type) {
|
|
|
this.getGoodsList();
|
|
@@ -670,6 +677,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ changeSaleType(index) {
|
|
|
+ if(this.goodsList[index].saleTypeId) {
|
|
|
+ let obj = this.salesTypeList.find(o => o.id == this.goodsList[index].saleTypeId);
|
|
|
+ this.goodsList[index].saleTypeName = obj.saleName;
|
|
|
+ this.goodsList[index].saleTypeCode = obj.saleCode;
|
|
|
+ }else {
|
|
|
+ this.goodsList[index].saleTypeName = '';
|
|
|
+ this.goodsList[index].saleTypeCode = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 检查库存
|
|
|
checkStock() {
|
|
|
if(!this.warehouseValue) {
|