|
@@ -187,20 +187,27 @@
|
|
<div class="main-title">
|
|
<div class="main-title">
|
|
<div class="title">货品信息</div>
|
|
<div class="title">货品信息</div>
|
|
<div>
|
|
<div>
|
|
- <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
<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 :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="序号" type="index" width="50"></el-table-column>
|
|
- <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" 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="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="物料编码" prop="materialNumber" 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="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>
|
|
<el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-model="scope.row.specification" size="small" v-if="listItem"></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.specification" size="mini" v-if="listItem"></el-input>
|
|
<div v-else>{{scope.row.specification}}</div>
|
|
<div v-else>{{scope.row.specification}}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -549,6 +556,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 = '';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
// 获取商品列表
|
|
// 获取商品列表
|
|
getGoodsList() {
|
|
getGoodsList() {
|
|
getRetailProductList({
|
|
getRetailProductList({
|