瀏覽代碼

【修改】大类bug

莫绍宝 3 年之前
父節點
當前提交
bac3967589
共有 1 個文件被更改,包括 22 次插入20 次删除
  1. 22 20
      src/views/supply/retail/components/retail_form.vue

+ 22 - 20
src/views/supply/retail/components/retail_form.vue

@@ -25,13 +25,15 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" :disabled="goodsList.length > 0">
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
+      </el-row>
+      <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
             <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
@@ -162,13 +164,13 @@
     <el-dialog title="添加产品" :visible.sync="isShowDialog" width="80%">
       <el-form ref="screenForm" :model="screenForm" size="small" label-position="left">
         <el-row :gutter="20">
-          <el-col :xs="12" :sm="6" :lg="6">
+          <!-- <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="type">
               <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" clearable :disabled="goodsList.length > 0 || rightGoodsList.length > 0">
                 <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="salesType">
               <el-select v-model="screenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
@@ -198,7 +200,7 @@
               <el-input v-model="screenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="12" :sm="12" :lg="12" class="tr">
+          <el-col :xs="12" :sm="12" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -285,7 +287,7 @@ export default {
       mainForm: {
         orderNum: '',
         date: '',
-        type: '',
+        // type: '',
         jxsNum: '',
         jxsName: '',
         serviceName: '',
@@ -295,9 +297,9 @@ export default {
         // date: [
         //   { required: true, message: '请选择单据日期', trigger: 'change' }
         // ],
-        type: [
-          { required: true, message: '请选择品类', trigger: 'change' }
-        ],
+        // type: [
+        //   { required: true, message: '请选择品类', trigger: 'change' }
+        // ],
       },
       goodsList: [],
 
@@ -366,7 +368,7 @@ export default {
         let data = res.data;
         this.mainForm.orderNum = data.id;
         this.mainForm.date = data.theTime.slice(0, 10);
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
         this.mainForm.remark = data.remark;
@@ -399,9 +401,9 @@ export default {
     },
 
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -412,7 +414,7 @@ export default {
       getGoodsList({
         pageNum: this.currentPage,
         pageSize: 10,
-        mainId: this.mainForm.type,
+        // mainId: this.mainForm.type,
         saleId: this.screenForm.salesType,
         materialCode: this.screenForm.proNum,
         materialName: this.screenForm.proName,
@@ -472,9 +474,9 @@ export default {
 
     // 提交筛选表单
     submitScreenForm() {
-      if(!this.mainForm.type) {
-        return this.$errorMsg('请选择产品大类');
-      }
+      // if(!this.mainForm.type) {
+      //   return this.$errorMsg('请选择产品大类');
+      // }
       this.currentPage = 1;
       this.getGoodsList();
     },
@@ -623,11 +625,11 @@ export default {
             delete item.wallets;
           })
 
-          let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
+          // let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
           let params = {
             // theTime: this.mainForm.date + ' 00:00:00',
-            mainId: this.mainForm.type,
-            mainName,
+            // mainId: this.mainForm.type,
+            // mainName,
             remark: this.mainForm.remark,
             type: 1, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList