浏览代码

采购、销售完善

lichao 3 年之前
父节点
当前提交
254ef5523f

+ 22 - 2
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -84,6 +84,21 @@
               :inactive-value="0"
             />
           </template>
+          <template slot="unit">
+            <el-select
+              v-model="form.unit"
+              clearable
+              filterable
+              placeholder="请选择 计量单位"
+            >
+              <el-option
+                v-for="(item, index) in unitOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
+          </template>
         </avue-form>
       </basic-container>
     </div>
@@ -331,11 +346,15 @@ export default {
             span: 24
           }
         ]
-      }
+      },
+      unitOption: [], //计量单位数组
     };
   },
   //初始化查询
   created() {
+    this.getWorkDicts('unit').then(res => {
+      this.unitOption = res.data.data;
+    })
     this.$set(this.form, 'status', 0)
     getDeptTree().then(res => {
       this.dicData = res.data.data;
@@ -376,7 +395,8 @@ export default {
     },
     //修改提交触发
     editProductInfo() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid, done) => {
+        done();
         //校验明细列表
         if (valid) {
           this.configuration.dicData.forEach(e => {

+ 3 - 3
src/views/dealer/purchase/config/customerContact.json

@@ -14,7 +14,7 @@
   "summaryText": "合计",
   "sumColumnList": [
     {
-      "name": "actualQuantity",
+      "name": "orderQuantity",
       "type": "sum"
     },
     {
@@ -42,10 +42,10 @@
       "overHidden": true
     },
     {
-      "label": "是否批次号",
+      "label": "是否按照批次号",
       "prop": "batch",
       "index": 2,
-      "width": 200,
+      "width": 110,
       "overHidden": true
     },
     {

+ 43 - 19
src/views/dealer/purchase/detail.vue

@@ -16,7 +16,7 @@
           size="small"
           class="el-button--small-yh"
           @click.stop="openEdit"
-          v-if="form.id"
+          v-if="form.id && disabled"
         >编 辑</el-button>
         <el-button
           type="primary"
@@ -25,8 +25,9 @@
           style="margin-right: 8px;"
           @click="dealerSubmit"
           :disabled="disabled"
+          v-if="form.id"
         >
-          {{ form.status == 0? '确 认': form.status == 3? '撤 销': '' }}
+          {{ form.status == 0? '确认订单': form.status == 3? '撤销订单': '' }}
         </el-button>
         <el-dropdown style="margin-right: 8px;">
           <el-button type="warning" size="small">账单处理<i class="el-icon-arrow-down el-icon--right"></i></el-button>
@@ -39,7 +40,7 @@
         </el-dropdown>
         <el-button
           type="success"
-          :disabled="!form.id || disabled"
+          :disabled="!form.id"
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
@@ -51,7 +52,7 @@
           @click="editCustomer"
           size="small"
           :loading="btnLoading"
-          :disabled="disabled"
+          :disabled="disabled || confirmDisabled"
         >保存数据
         </el-button>
       </div>
@@ -70,14 +71,14 @@
               v-model="form.corpId"
               @getCorpData="getCorpData"
               corpType="GYS"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             ></crop-select>
           </template>
           <template slot="storageId">
             <warehouse-select
               v-model="form.storageId"
               :configuration="configurationWarehouse"
-              :disabled="disabled"/>
+              :disabled="disabled || confirmDisabled"/>
           </template>
         </avue-form>
       </basic-container>
@@ -97,7 +98,7 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >录入明细</el-button>
             <el-button
               type="info"
@@ -113,7 +114,7 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
             >
             <el-button
@@ -121,7 +122,7 @@
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >删除</el-button
             >
           </template>
@@ -182,12 +183,21 @@
           </template>
           <!--          单位-->
           <template slot="unit" slot-scope="{ row, index }">
-            <el-input
+            <el-select
               v-if="row.$cellEdit"
               v-model="row.unit"
               size="small"
               :disabled="!form.lotNo"
-            ></el-input>
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in unitOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
             <span v-else>{{ row.unit }}</span>
           </template>
           <template slot="amount" slot-scope="{ row, index }">
@@ -212,7 +222,7 @@
         :data="uploadData"
         deleteUrl="/api/blade-client/corpsbank/update"
         :enumerationValue="84"
-        :disabled="disabled"
+        :disabled="disabled || confirmDisabled"
       />
     </div>
     <el-dialog
@@ -361,6 +371,7 @@ export default {
       pageLoading: false,
       btnLoading: false,
       disabled: false,
+      confirmDisabled: false, // 确认禁用
       form: {},
       option: {
         menuBtn: false,
@@ -559,6 +570,7 @@ export default {
       applySettlementDialog:false,//生成账单组件
       financialAccountDialog:false,
       feesOption: [],
+      unitOption: [],
     }
   },
   async created() {
@@ -570,6 +582,9 @@ export default {
       this.getColumnName(83),
       goodsOption
     );
+    this.getWorkDicts('unit').then(res => {
+      this.unitOption = res.data.data;
+    })
     getGoods(1, 500).then(res => {
       this.goodsoptions = res.data.data.records;
     });
@@ -622,6 +637,12 @@ export default {
       dataDetail(id).then(res => {
         this.form = res.data.data;
         this.form.amount = Number(this.form.amount).toFixed(2);
+        this.confirmDisabled = this.form.status == 3? true: false;
+        if (this.confirmDisabled) {
+          this.option.column.map(e => {
+            this.$set(e, 'disabled', true)
+          })
+        }
         this.dataList = this.form.orderItemsList? this.form.orderItemsList: [];
         this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
         delete this.form.orderItemsList;
@@ -635,10 +656,11 @@ export default {
     },
     openEdit() {
       this.disabled = false;
-      this.option.column.map(e => {
-        // e.disabled = false;
-        this.$set(e, 'disabled', false)
-      })
+      if (this.form.status != 3) {
+        this.option.column.map(e => {
+          this.$set(e, 'disabled', false)
+        })
+      }
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
@@ -646,7 +668,8 @@ export default {
     getCorpData(row) {},
     //修改提交触发
     editCustomer(status) {
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate((valid, done) => {
+        done();
         if (valid) {
           // 总金额计算
           let amount = 0;
@@ -993,9 +1016,10 @@ export default {
       this.applyPaymentList = [];
       this.dataList.map(e => {
         const form = {
-          srcOrderno:this.form.orgOrderNo,
+          srcOrderno:this.form.orderNo,
+          srcParentId: this.form.id,
           itemType:"采购",
-          corpsName:this.form.corpName,
+          corpsName:this.form.corpsName,
           corpId:this.form.corpId,
           currency: 'CNY',
           exchangeRate: '1',

+ 1 - 1
src/views/dealer/sales/config/customerContact.json

@@ -14,7 +14,7 @@
   "summaryText": "合计",
   "sumColumnList": [
     {
-      "name": "actualQuantity",
+      "name": "orderQuantity",
       "type": "sum"
     },
     {

+ 44 - 19
src/views/dealer/sales/detail.vue

@@ -16,7 +16,7 @@
           size="small"
           class="el-button--small-yh"
           @click.stop="openEdit"
-          v-if="form.id"
+          v-if="form.id && disabled"
         >编 辑</el-button>
         <el-button
           type="primary"
@@ -24,8 +24,9 @@
           style="margin-right: 8px;"
           @click="dealerSubmit"
           :disabled="disabled"
+          v-if="form.id"
         >
-          {{ form.status == 0? '确 认': form.status == 3? '撤 销': '' }}
+          {{ form.status == 0? '确认订单': form.status == 3? '撤销订单': '' }}
         </el-button>
         <el-dropdown style="margin-right: 8px;">
           <el-button type="warning" size="small">账单处理<i class="el-icon-arrow-down el-icon--right"></i></el-button>
@@ -39,7 +40,7 @@
         </el-dropdown>
         <el-button
           type="success"
-          :disabled="!form.id || disabled"
+          :disabled="!form.id"
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
@@ -51,7 +52,7 @@
           @click="editCustomer"
           size="small"
           :loading="btnLoading"
-          :disabled="disabled"
+          :disabled="disabled || confirmDisabled"
         >保存数据
         </el-button>
       </div>
@@ -70,7 +71,7 @@
               v-model="form.corpId"
               @getCorpData="getCorpData"
               corpType="KH"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             />
           </template>
           <template slot="belongToCorpId">
@@ -78,14 +79,14 @@
               v-model="form.belongToCorpId"
               @getCorpData="getGSData"
               corpType="GS"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             />
           </template>
           <template slot="storageId">
             <warehouse-select
               v-model="form.storageId"
               :configuration="configurationWarehouse"
-              :disabled="disabled"/>
+              :disabled="disabled || confirmDisabled"/>
           </template>
           <template slot="chargeMember">
             <el-select
@@ -93,7 +94,7 @@
               filterable
               clearable
               size="small"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >
               <el-option
                 v-for="(item,index) in userList"
@@ -121,7 +122,7 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
-              :disabled="disabled"
+              :disabled="disabled || !form.storageId || confirmDisabled"
             >录入明细</el-button>
             <el-button
               type="info"
@@ -137,7 +138,7 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
             >
             <el-button
@@ -145,7 +146,7 @@
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
-              :disabled="disabled"
+              :disabled="disabled || confirmDisabled"
             >删除</el-button
             >
           </template>
@@ -201,11 +202,21 @@
           </template>
 <!--          单位-->
           <template slot="unit" slot-scope="{ row, index }">
-            <el-input
+            <el-select
               v-if="row.$cellEdit"
               v-model="row.unit"
               size="small"
-            ></el-input>
+              :disabled="!form.lotNo"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in unitOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
             <span v-else>{{ row.unit }}</span>
           </template>
           <template slot="amount" slot-scope="{ row, index }">
@@ -258,7 +269,7 @@
         :data="uploadData"
         deleteUrl="/api/blade-client/corpsbank/update"
         :enumerationValue="84"
-        :disabled="disabled"
+        :disabled="disabled || confirmDisabled"
       />
     </div>
 <!--    商品弹窗-->
@@ -417,6 +428,7 @@ export default {
       pageLoading: false,
       btnLoading: false,
       disabled: false, // 编辑
+      confirmDisabled: false, // 确认禁用
       form: {},
       option: {
         menuBtn: false,
@@ -638,9 +650,13 @@ export default {
       applySettlementDialog:false,//生成账单组件
       financialAccountDialog:false,
       feesOption: [],
+      unitOption: [],
     }
   },
   async created() {
+    this.getWorkDicts('unit').then(res => {
+      this.unitOption = res.data.data;
+    })
     this.tableOption = await this.getColumnData(
       this.getColumnName(79),
       tableOption
@@ -704,6 +720,12 @@ export default {
       dataDetail(id).then(res => {
         this.form = res.data.data;
         this.form.amount = Number(this.form.amount).toFixed(2);
+        this.confirmDisabled = this.form.status == 3? true: false;
+        if (this.confirmDisabled) {
+          this.option.column.map(e => {
+            this.$set(e, 'disabled', true)
+          })
+        }
         this.dataList = this.form.orderItemsList? this.form.orderItemsList: [];
         this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
         delete this.form.orderItemsList;
@@ -726,10 +748,11 @@ export default {
     },
     openEdit() {
       this.disabled = false;
-      this.option.column.map(e => {
-        // e.disabled = false;
-        this.$set(e, 'disabled', false)
-      })
+      if (this.form.status != 3) {
+        this.option.column.map(e => {
+          this.$set(e, 'disabled', false)
+        })
+      }
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
@@ -746,7 +769,8 @@ export default {
     getGSData(row) {},
     //修改提交触发
     editCustomer(status) {
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate((valid, done) => {
+        done();
         if (valid) {
           for (let item in this.dataList) {
             if (this.dataList[item].batch == 1 && !this.dataList[item].lotNo) {
@@ -1177,6 +1201,7 @@ export default {
       this.dataList.map(e => {
         const form = {
           srcOrderno:this.form.orgOrderNo,
+          srcParentId: this.form.id,
           itemType:"销售",
           corpsName:this.form.corpName,
           corpId:this.form.corpId,

+ 8 - 0
src/views/dealer/stock/config/mainList.json

@@ -38,6 +38,14 @@
       "overHidden": true
     },
     {
+      "label": "批次号",
+      "prop": "lotNo",
+      "search": true,
+      "index": 1,
+      "width": 120,
+      "overHidden": true
+    },
+    {
       "label": "花纹",
       "prop": "brandItem",
       "search": true,

+ 19 - 0
src/views/wel/components/quick-launch.vue

@@ -94,6 +94,16 @@
           <span>付费</span>
         </div>
       </div>
+      <div class="content" v-if="sysType == 6">
+        <div class="content-icon" @click="inPage('cg')">
+          <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
+          <span>采购</span>
+        </div>
+        <div class="content-icon" @click="inPage('xs')">
+          <i class="tradingIcon icon-sales" style="color:#409EFF"></i>
+          <span>销售</span>
+        </div>
+      </div>
     </el-card>
   </div>
 </template>
@@ -215,6 +225,15 @@ export default {
             this.$router.push("/basicData/basicFeesDesc/index");
             break;
         }
+      } else if (this.sysType == 6) {
+        switch (type) {
+          case "xs":
+            this.$router.push("/dealer/sales/index");
+            break;
+          case "cg":
+            this.$router.push("/dealer/purchase/index");
+            break;
+        }
       }
     }
   }