lichao 3 lat temu
rodzic
commit
4a42d31e76

+ 8 - 0
src/components/finance/financialAccount.vue

@@ -272,6 +272,10 @@
       },
       belongCompany: {
         type: String,
+      },
+      tradeType: {
+        type: String,
+        default: null
       }
     },
     data(){
@@ -409,6 +413,9 @@
             this.data.push(item)
           })
         }
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
 
         //删除 提单号
         if(this.billData.optionType !== "JK"){
@@ -510,6 +517,7 @@
           pageLabel: this.checkData.pageLabel,
           checkType: this.checkData.checkType,
           billType : this.billType,
+          tradeType: this.tradeType,
           DC : this.billData.itemType === "采购"?"C":"D",     //账单明细会根据D C区分采购 销售搜索
           itemsList: itemsList,
           belongCompany: this.belongCompany // 所属公司

+ 9 - 0
src/views/basicData/productInformation/configuration/mainList.json

@@ -46,6 +46,15 @@
       ]
     },
     {
+      "label": "产品名称(模糊)",
+      "prop": "cnameInt",
+      "search": true,
+      "width": 100,
+      "overHidden": true,
+      "hide": true,
+      "showColumn": false
+    },
+    {
       "label": "产品类别",
       "prop": "goodsTypeId",
       "dicData": [],

+ 6 - 10
src/views/basicData/productInformation/index.vue

@@ -75,16 +75,12 @@
               <!--            >下架-->
               <!--            </el-button>-->
             </template>
-            <template slot="search" slot-scope="{row,size}">
-              <div class="el-form-item el-form-item--small avue-form__item--">
-                <span class="el-form-item__label">产品名称模糊:</span>
-                <el-input
-                  placeholder="请输入 产品名称"
-                  size="small"
-                  style="width: 60%"
-                  v-model="search.cnameInt"
-                ></el-input>
-              </div>
+            <template slot="cnameIntSearch">
+              <el-input
+                placeholder="请输入 产品名称"
+                size="small"
+                v-model="search.cnameInt"
+              ></el-input>
             </template>
           </avue-crud>
           <el-dialog title="导入产品"

+ 3 - 3
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -28,7 +28,7 @@
           type="primary"
           size="small"
           :disabled="detailData.seeDisabled || arrivalDisabled"
-          v-if="form.deliveryStatus == '已货'"
+          v-if="form.deliveryStatus == '已货'"
           :loading="saveLoading"
           @click="confirmArrival"
         >确认到货</el-button>
@@ -37,7 +37,7 @@
           type="primary"
           @click="revokeOutGoods"
           size="small"
-          v-if="form.deliveryStatus == '已货'"
+          v-if="form.deliveryStatus == '已货'"
           :loading="saveLoading"
           :disabled="detailData.seeDisabled || arrivalDisabled"
         >撤销收货</el-button>
@@ -978,7 +978,7 @@ export default {
       this.saveLoading = true
       detail(id).then(res => {
         this.form = res.data.data;
-        if (this.form.deliveryStatus == '已货') {
+        if (this.form.deliveryStatus == '已货') {
           this.deliverDisabled = true;
           this.arrivalDisabled = false;
         } else if (this.form.deliveryStatus == '已到货') {

+ 1 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -75,7 +75,7 @@
             type="text"
             icon="el-icon-delete"
             size="small"
-            :disabled="scope.row.deliveryStatus === '已货'"
+            :disabled="scope.row.deliveryStatus === '已货'"
             @click.stop="rowDel(scope.row,scope.index)"
           >删除
           </el-button>

+ 94 - 62
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -239,17 +239,18 @@
             </template>
           </avue-crud>
         </basic-container>
-        <fee-info
-          ref="feeInfo"
-          :orderFeesList="advantageProjectData"
-          :disabled="detailData.seeDisabled"
-          feeUrl="/trade-purchase/purchase-order/removeByFees"
-          optionType="GN"
-          itemType="采购"
-          @beforeFinance="beforeFinance"
-          :corpId="form.corpId"
-          :tabShow="3"
-        />
+<!--        注释,怕再次需要-->
+<!--        <fee-info-->
+<!--          ref="feeInfo"-->
+<!--          :orderFeesList="advantageProjectData"-->
+<!--          :disabled="detailData.seeDisabled"-->
+<!--          feeUrl="/trade-purchase/purchase-order/removeByFees"-->
+<!--          optionType="GN"-->
+<!--          itemType="采购"-->
+<!--          @beforeFinance="beforeFinance"-->
+<!--          :corpId="form.corpId"-->
+<!--          :tabShow="3"-->
+<!--        />-->
         <containerTitle title="附件上传"></containerTitle>
         <c-upload
           :data="bankOfDepositData"
@@ -383,9 +384,10 @@
       <financial-account
         v-if="financialAccountDialog"
         :billType="billType"
-        :billData="{}"
+        :billData="billData"
         :arrList="applyPaymentList"
         :checkData="financeData"
+        tradeType="GN"
         @choceFun="choceFun"
         @submit="feeSubmit"
       >
@@ -1442,7 +1444,7 @@ export default {
           //商品信息
           this.form.itemsVOList = this.contactsData
           // this.form.orderFeesList = this.advantageProjectData
-          this.form.orderFeesList = this.$refs.feeInfo.submitData()
+          // this.form.orderFeesList = this.$refs.feeInfo.submitData()
           this.form.orderFilesList = this.bankOfDepositData
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
@@ -1499,59 +1501,89 @@ export default {
         pageLabel:"付费申请",
         checkType: 'ffsq'
       }
+      let amount = 0;
+      let quantity = 0;
       this.contactsData.map(e => {
         if (e.submitPay != 1) {
-          const form = {
-            belongCompany: this.form.belongCompany,
-            srcOrderno:this.form.orderNo,
-            itemType:"采购",
-            corpsName:this.form.corpsName,
-            corpId:this.form.corpId,
-            srcParentId: this.form.id,
-            currency: 'CNY',
-            exchangeRate: '1',
-            taxRate: '0',
-            accDate: this.form.businesDate,
-            srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
-            tradeType: 'GN',
-            optionType: 'GN',
-            amount: e.amount,
-            goodName: e.cname,
-            price: e.purchaseAmount,
-            unit: e.unit,
-            quantity: e.orderQuantity,
-            srcFeesId: e.id,
-            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
-          }
-          arr.push(form)
+          amount += Number(e.amount)
+          quantity += Number(e.orderQuantity)
         }
       })
-      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2 && item.submitPay != 1)
-      getFeeList.forEach(item => {
-        let form = {
-          srcOrderno:this.form.orderNo,
-          itemType:"采购",
-          corpsName:item.corpName,
-          corpId: item.corpId,
-          srcParentId: this.form.id,
-          currency: 'CNY',
-          exchangeRate: '1',
-          taxRate: '0',
-          accDate: this.form.businesDate,
-          srcType: 2,
-          tradeType: 'GN',
-          optionType: 'GN',
-          chargeMember: this.form.chargeMember,
-          parentId: this.form.id,
-          amount: item.amount,
-          costType: item.itemId,
-          srcFeesId: item.id,
-          quantity: item.quantity, // 数量
-          price: item.price,
-        }
-        arr.push(form)
-      })
-      this.applyPaymentList = [...arr]
+      const price = quantity === 0? 0: Number(amount) / Number(quantity)
+      this.billData = {
+        belongCompany: this.form.belongCompany,
+        srcOrderno:this.form.orderNo,
+        itemType:"采购",
+        corpsName:this.form.corpsName,
+        corpId:this.form.corpId,
+        srcParentId: this.form.id,
+        currency: 'CNY',
+        exchangeRate: '1',
+        taxRate: '0',
+        accDate: this.form.businesDate,
+        srcType: 1,
+        tradeType: 'GN',
+        optionType: 'GN',
+        costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        amount,
+        quantity,
+        price,
+        unit: '条',
+        remarks: this.form.orderRemark,
+      }
+      // this.contactsData.map(e => {
+      //   if (e.submitPay != 1) {
+      //     const form = {
+      //       belongCompany: this.form.belongCompany,
+      //       srcOrderno:this.form.orderNo,
+      //       itemType:"采购",
+      //       corpsName:this.form.corpsName,
+      //       corpId:this.form.corpId,
+      //       srcParentId: this.form.id,
+      //       currency: 'CNY',
+      //       exchangeRate: '1',
+      //       taxRate: '0',
+      //       accDate: this.form.businesDate,
+      //       srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
+      //       tradeType: 'GN',
+      //       optionType: 'GN',
+      //       amount: e.amount,
+      //       goodName: e.cname,
+      //       price: e.purchaseAmount,
+      //       unit: e.unit,
+      //       quantity: e.orderQuantity,
+      //       srcFeesId: e.id,
+      //       costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+      //     }
+      //     arr.push(form)
+      //   }
+      // })
+      // let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2 && item.submitPay != 1)
+      // getFeeList.forEach(item => {
+      //   let form = {
+      //     srcOrderno:this.form.orderNo,
+      //     itemType:"采购",
+      //     corpsName:item.corpName,
+      //     corpId: item.corpId,
+      //     srcParentId: this.form.id,
+      //     currency: 'CNY',
+      //     exchangeRate: '1',
+      //     taxRate: '0',
+      //     accDate: this.form.businesDate,
+      //     srcType: 2,
+      //     tradeType: 'GN',
+      //     optionType: 'GN',
+      //     chargeMember: this.form.chargeMember,
+      //     parentId: this.form.id,
+      //     amount: item.amount,
+      //     costType: item.itemId,
+      //     srcFeesId: item.id,
+      //     quantity: item.quantity, // 数量
+      //     price: item.price,
+      //   }
+      //   arr.push(form)
+      // })
+      // this.applyPaymentList = [...arr]
       if(bool){ //申请货款
         // this.billData.srcId = -1
       }

+ 14 - 5
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -565,6 +565,7 @@
                        :table-loading="loadingPolicy"
                        :data="dataPolicy"
                        ref="crud"
+                       :key="policyIndex"
                        @selection-change="selectionChangePolicy"
                        :page.sync="pagePolicy">
               <template slot="menuLeft">
@@ -577,7 +578,7 @@
                 <el-upload
                   :action="policyUrl+'?policyName=' + uploadPolicy.policyName + '&salesType=1'"
                   :headers="headers"
-                  :disabled="detailData.seeDisabled || browse"
+                  :disabled="uploadPolicy.policyName === '' || loadingPolicy"
                   :on-progress="uploading"
                   :show-file-list=false
                   accept=".xls,.xlsx"
@@ -590,7 +591,7 @@
                     type="primary"
                     size="mini"
                     icon="el-icon-upload"
-                    :disabled="uploadPolicy.policyName === ''"
+                    :disabled="uploadPolicy.policyName === '' || loadingPolicy"
                     :loading="loadingPolicy"
                   >导 入</el-button>
                 </el-upload>
@@ -1655,6 +1656,7 @@ export default {
       arrearsCheck: false, // 是否欠款发货审批
       shopQualityDisable: false, //质量胎切换禁用
       index: 0,
+      policyIndex: 0,
     }
   },
   mounted() {
@@ -2088,10 +2090,11 @@ export default {
     successPolicy(res, file) {
       this.openFullScreen(true)
       if (res.data.message === "" && !res.data.message) {
-        this.dataPolicy = res.data.list? res.data.list: [];
+        this.dataPolicy = res.data.list? [...res.data.list]: [];
+        this.policyIndex++;
       } else {
         this.dataPolicy = res.data.list? res.data.list: [];
-        this.$message.error('导入失败,商品编码有:' + res.data.message);
+        this.$message.error(res.data.message);
       }
     },
     uploadError(err, file, fileList) {
@@ -2903,7 +2906,7 @@ export default {
         if(res.data.data.specialItemList) {
           this.dataPolicy = res.data.data.specialItemList
           this.dataPolicy.forEach(item => {
-            this.$set(item, 'orderQuantity', 1);
+            this.$set(item, 'orderQuantity', 0);
           })
         } else {
           this.dataPolicy = []
@@ -2992,12 +2995,18 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           const length = this.goodsActives === 'gift'? this.contactsData.length: this.goodsShowData.length
+          const length1 = this.goodsActives === 'goods'? this.giftData.length: this.goodsShowData.length
           for (let i = 0;i < length;i++) {
             const data = this.goodsActives === 'gift'? this.contactsData: this.goodsShowData;
             if (Number(data[i].orderQuantity) > Number(data[i].storageQuantity)) {
               return this.$message.error('商品信息第' + (Number(i) + 1) + '行订货数量大于库存数量')
             }
           }
+          let integral = 0;//积分
+          length1.forEach(item => {
+            integral += Number(item.integral)
+          })
+          if (Number(this.form.pointMutiple) > Number(integral)) return this.$message.error('积分余额不足')
           //商品信息
           if (this.goodsActives == 'gift') {
             this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)

+ 7 - 0
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -95,6 +95,13 @@
       "index": 5
     },
     {
+      "label": "数量",
+      "prop": "quantity",
+      "width": 120,
+      "overHidden": true,
+      "index": 6
+    },
+    {
       "label": "单价",
       "prop": "price",
       "width": 120,

+ 32 - 1
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -128,6 +128,9 @@
             >删除
             </el-button>
           </template>
+          <template slot="srcOrderno" slot-scope="scope">
+            <span style="color: #409EFF;cursor: pointer" @click="jumpPage(scope.row, index)">{{scope.row.srcOrderno}}</span>
+          </template>
           <template slot-scope="{ row }" slot="currency">
             <el-select  v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable filterable>
               <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
@@ -569,7 +572,7 @@
         this.$refs["form"].validate((valid,done) => {
           done();
           if(valid && this.verificationData()){
-            this.$confirm("是否确认付费?", "提示", {
+            this.$confirm("是否确认" + (this.financeDisabled? '付费': '撤销付费'), "提示", {
               confirmButtonText: "确认",
               cancelButtonText: "取消",
               type: "warning",
@@ -793,6 +796,34 @@
       cellStyle() {
         return "padding:0;height:40px;";
       },
+      // 跳转页面
+      jumpPage(row, index) {
+        if (this.category == 2) {
+          this.$router.$avueRouter.closeTag("/businessManagement/purchaseOrder/index");
+          this.$router.push({
+            path: "/businessManagement/purchaseOrder/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 3) {
+          this.$router.$avueRouter.closeTag("/purchase/contract/index");
+          this.$router.push({
+            path: "/purchase/contract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 4) {
+          this.$router.$avueRouter.closeTag("/exportTrade/purchaseContract/index");
+          this.$router.push({
+            path: "/exportTrade/purchaseContract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        }
+      },
     }
   }
 </script>

+ 29 - 1
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -607,7 +607,7 @@
         this.$refs["form"].validate((valid,done) => {
           done();
           if(valid && this.verificationData()){
-            this.$confirm("是否确认收费?", "提示", {
+            this.$confirm("是否确认" + (this.financeDisabled? '收费': '撤销收费'), "提示", {
               confirmButtonText: "确认",
               cancelButtonText: "取消",
               type: "warning",
@@ -848,6 +848,34 @@
       onClose(val) {
         this.switchDialog = val;
       },
+      // 跳转页面
+      jumpPage(row, index) {
+        if (this.category == 2) {
+          this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
+          this.$router.push({
+            path: "/businessManagement/salesOrder/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 3) {
+          this.$router.$avueRouter.closeTag("/salesManagement/salesContract/index");
+          this.$router.push({
+            path: "/salesManagement/salesContract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        } else if (this.category == 4) {
+          this.$router.$avueRouter.closeTag("/exportTrade/salesContract/index");
+          this.$router.push({
+            path: "/exportTrade/salesContract/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        }
+      },
     }
   }
 </script>

+ 29 - 0
src/views/maintenance/salesPolicy/configuration/BuyFree.json

@@ -163,6 +163,35 @@
         }
       ]
     },{
+      "label": "体积",
+      "prop": "cntrVolumn",
+      "index": 6,
+      "width":100,
+      "cell": false,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "重量",
+      "prop": "cartonWeight",
+      "index": 6,
+      "width":100,
+      "cell": false,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "操作员",
       "prop": "updateUserName",
       "index": 6,

+ 30 - 0
src/views/maintenance/salesPolicy/configuration/customerContact.json

@@ -147,6 +147,36 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "体积",
+      "prop": "cntrVolumn",
+      "index": 6,
+      "width":100,
+      "cell": false,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "重量",
+      "prop": "cartonWeight",
+      "index": 6,
+      "width":100,
+      "cell": false,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
     },{
       "label": "操作员",
       "prop": "updateUserName",

+ 10 - 6
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -672,6 +672,8 @@ export default {
                   item.productCategory = e.goodsTypeName;
                   item.typeno = e.typeno;
                   item.brandItem = e.brandItem;
+                  item.cartonWeight = e.cartonWeight;
+                  item.cntrVolumn = e.cntrVolumn;
                   // item.purchasePrice = this.brand.purchasePrice
                   // item.salesPrice = this.brand.salesPrice
                   // item.specialOffer = this.brand.specialOffer
@@ -689,6 +691,8 @@ export default {
                 item.productCategory = e.goodsTypeName;
                 item.typeno = e.typeno;
                 item.brandItem = e.brandItem;
+                item.cartonWeight = e.cartonWeight;
+                item.cntrVolumn = e.cntrVolumn;
                 // item.purchasePrice = this.brand.purchasePrice
                 // item.salesPrice = this.brand.salesPrice
                 // item.salesPrice = this.brand.purchaseAmount
@@ -717,7 +721,9 @@ export default {
               specialOffer: "",
               updateUserName: "",
               updateTime: "",
-              salesType: "1"
+              salesType: "1",
+              cntrVolumn: item.cntrVolumn,
+              cartonWeight: item.cartonWeight,
             });
           });
         } else if (this.salesType == 2) {
@@ -737,24 +743,22 @@ export default {
               salesVolume: "",
               updateUserName: "",
               updateTime: "",
-              salesType: "2"
+              salesType: "2",
+              cntrVolumn: item.cntrVolumn,
+              cartonWeight: item.cartonWeight,
             });
           });
         }
       }
       this.dialogVisible = false;
-      console.log(this.contactsData);
     },
     //买赠列表信息保存触发
     rowSaveBuyFree(row, done, loading) {
-      console.log(row);
-      console.log(this.contactsData);
       // this.contactsData.push(row)
       done();
     },
     //买赠列表点击行可编辑
     handleRowClickBuyFree(row, event, column) {
-      console.log(row.$index);
     },
     //买赠列表修改信息触发
     rowUpdateBuyFree(row, index, done, loading) {

+ 7 - 0
src/views/purchase/contract/index.vue

@@ -146,6 +146,13 @@ export default {
         }
         this.show = false;
         this.$store.commit("ENTRANCE_IN_DETAIL");
+      } else if (this.$route.query.params) {
+        this.detailData={
+          id:this.$route.query.params,
+          view:true,
+        }
+        this.show = false;
+        this.$store.commit("ENTRANCE_IN_DETAIL");
       }
     }, 100);
   },

+ 7 - 0
src/views/salesManagement/salesContract/index.vue

@@ -150,6 +150,13 @@ export default {
         }
         this.show = false;
         this.$store.commit("XSACE_IN_DETAIL");
+      } else if (this.$route.query.params) {
+        this.detailData={
+          id:this.$route.query.params,
+          view:true,
+        }
+        this.show = false;
+        this.$store.commit("XSACE_IN_DETAIL");
       }
     }, 100);
   },