Ver código fonte

增加所属公司

lichao 3 anos atrás
pai
commit
7c82896df8

+ 1 - 1
src/components/finance/config/option.json

@@ -49,7 +49,7 @@
     },
     {
       "label": "所属公司",
-      "prop": "belongToCorpId",
+      "prop": "belongCompany",
       "overHidden": true,
       "index": 4,
       "width": 180,

+ 5 - 1
src/components/finance/financialAccount.vue

@@ -167,6 +167,9 @@
           checkType: null
         },
       },
+      belongCompany: {
+        type: String,
+      }
     },
     data(){
       return {
@@ -334,7 +337,8 @@
           checkType: this.checkData.checkType,
           billType : this.billType,
           DC : this.billData.itemType === "采购"?"C":"D",     //账单明细会根据D C区分采购 销售搜索
-          itemsList: itemsList
+          itemsList: itemsList,
+          belongCompany: this.belongCompany // 所属公司
         }
         // 采购申请货款   销售申请退款 都会走申请 走审核   => 付款申请
         if(this.billType === "申请"){

+ 0 - 11
src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue

@@ -518,17 +518,6 @@ export default {
             ]
           },
           {
-            label: "所属公司",
-            prop: "belongtocompany",
-            rules: [
-              {
-                required: false,
-                message: " ",
-                trigger: "blur"
-              }
-            ]
-          },
-          {
             label: "分管员",
             prop: "adminProfiles",
             span: 8

+ 5 - 0
src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue

@@ -84,6 +84,11 @@
                   >
                   </el-option>
                 </el-select>
+                <crop-select
+                  v-else-if="item.prop === 'belongtocompany'"
+                  v-model="form[item.prop]"
+                  corpType="GS"
+                ></crop-select>
                 <el-input
                   type="age"
                   v-else

+ 23 - 5
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -20,6 +20,7 @@
           size="small"
           :disabled="detailData.seeDisabled"
           v-if="form.deliveryStatus == '已到货'"
+          :loading="saveLoading"
           @click="cancelArrival"
         >撤销到货</el-button>
         <el-button
@@ -28,6 +29,7 @@
           size="small"
           :disabled="detailData.seeDisabled || arrivalDisabled"
           v-if="form.deliveryStatus == '已发货'"
+          :loading="saveLoading"
           @click="confirmArrival"
         >确认到货</el-button>
         <el-button
@@ -36,6 +38,7 @@
           @click="revokeOutGoods"
           size="small"
           v-if="form.deliveryStatus == '已发货'"
+          :loading="saveLoading"
           :disabled="detailData.seeDisabled || arrivalDisabled"
         >撤销发货</el-button>
         <el-button
@@ -44,12 +47,14 @@
           @click="sendOutGoods"
           size="small"
           v-if="form.deliveryStatus == '录入'"
+          :loading="saveLoading"
           :disabled="detailData.seeDisabled || !form.id || arrivalDisabled"
         >确认发货</el-button>
         <el-button
           class="el-button--small-yh"
           size="small"
           type="success" @click="copyOrder"
+          :loading="saveLoading"
           :disabled="detailData.seeDisabled || !form.id || arrivalDisabled">
           复制单据
         </el-button>
@@ -84,12 +89,14 @@
                   corpType="KH"
                   :disabled="detailData.seeDisabled || arrivalDisabled || deliverDisabled"
                   style="width: 100%"
+                  @getCorpData="returnBack"
                 ></crop-select>
                 <crop-select
                   v-else-if="item.prop === 'salesCompany'"
                   v-model="form[item.prop]"
                   corpType="GS"
                   :disabled="detailData.seeDisabled || arrivalDisabled || deliverDisabled"
+                  @getCorpData="getGSName"
                 ></crop-select>
                 <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled || deliverDisabled">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
@@ -975,11 +982,7 @@ export default {
       delete this.form.orderItemsList
       this.configuration.dicData = this.form.corpName
       delete this.form.corpName
-      if (this.form.belongToCorpList) {
-        this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
-        delete this.form.belongToCorpId
-        this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.belongToCorpList)
-      }
+      this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
       delete this.form.belongToCorpList
       this.$set(this.form, 'deliveryAmount', 0)
       this.$set(this.form, 'totalQuantity', 0)
@@ -1647,6 +1650,7 @@ export default {
               this.queryData(res.data.data.id, false, type)
             }
           }).catch(() => {
+            this.pageLoading = false
             this.saveLoading = false
           })
         } else {
@@ -1739,11 +1743,13 @@ export default {
             }
             this.pageLoading = true
             this.saveActives = ''
+            this.saveLoading = true
             sendOutGoods(this.form).then(res => {
               this.$message.success('发货成功')
               this.queryData(res.data.data.id)
             }).finally(() => {
               this.pageLoading = false
+              this.saveLoading = false
             })
           }
         } else {
@@ -1767,12 +1773,14 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
           this.pageLoading = true
+          this.saveLoading = true
           this.saveActives = ''
           revokeOutGoods(this.form).then(res => {
             this.$message.success('撤销成功')
             this.queryData(res.data.data.id)
           }).finally(() => {
             this.pageLoading = false
+            this.saveLoading = false
           })
         } else {
           return false;
@@ -1813,12 +1821,14 @@ export default {
           this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
         }
         this.pageLoading = true
+        this.saveLoading = true
         this.saveActives = ''
         confirmArrival(this.form).then(res => {
           this.$message.success('已确认到货')
           this.queryData(this.form.id)
         }).catch(() => {
           this.pageLoading = false
+          this.saveLoading = false
         })
       }
     },
@@ -2024,6 +2034,14 @@ export default {
         this.saveLoading = false
       })
     },
+    returnBack(data) {
+      if (data.belongtocompany) {
+        // this.form.salesCompany = data.belongtocompany
+      }
+    },
+    getGSName(row) {
+      this.form.belongCompany = row.cname
+    },
   }
 }
 </script>

+ 37 - 11
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -107,6 +107,13 @@
                   @getCorpData="returnBack"
                   :disabled="detailData.seeDisabled"
                 ></crop-select>
+                <crop-select
+                  v-else-if="item.prop === 'belongToCorpId'"
+                  v-model="form[item.prop]"
+                  corpType="GS"
+                  :disabled="detailData.seeDisabled"
+                  @getCorpData="getGSName"
+                ></crop-select>
                 <el-select v-else-if="item.prop === 'banks'"
                            v-model="form[item.prop]" placeholder="请选择"
                            clearable
@@ -757,6 +764,28 @@ export default {
               }
             ]
           },{
+            label: '所属公司',
+            prop: 'belongToCorpId',
+            span: 16,
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },{
+            label: '要求到货日期',
+            prop: 'requiredArrivalDate',
+            type: 'datetime',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },{
             label: '银行账号',
             prop: 'banks',
             rules: [
@@ -823,17 +852,6 @@ export default {
           //   ]
           // },
           {
-            label: '要求到货日期',
-            prop: 'requiredArrivalDate',
-            type: 'datetime',
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
-          }, {
             label: '已付金额',
             prop: 'settlmentAmount',
             type: 'number',
@@ -1555,6 +1573,7 @@ export default {
               })
             }
           }).catch(() => {
+            this.pageLoading = false
             this.saveLoading = false
           })
         } else {
@@ -1574,6 +1593,7 @@ export default {
       }
       //采购明细提单号 list
       this.billData = {
+        belongCompany: this.form.belongCompany,
         srcOrderno:this.form.orderNo,
         itemType:"采购",
         corpsName:this.form.corpsName,
@@ -1711,6 +1731,9 @@ export default {
       }
     },
     returnBack(row) {
+      if (row.belongtocompany) {
+        // this.form.belongToCorpId = row.belongtocompany
+      }
       this.$set(this.form, 'paymentType', row.paymentType)
       this.$set(this.form, 'packageRemarks', row.packageRemarks)
       getlistBankBy(row.id).then(res =>{
@@ -1859,6 +1882,9 @@ export default {
         this.saveLoading = false
       })
     },
+    getGSName(row) {
+      this.form.belongCompany = row.cname
+    },
   }
 }
 </script>

+ 1 - 3
src/views/businessManagement/purchaseOrder/index.vue

@@ -276,12 +276,10 @@ export default {
         moduleName: 'cg',
         tableName: 'business_order',
         billId: row.id,
-        no: 87654567
+        no: localStorage.getItem('browserID')
       }
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
-          this.onLock(data).then(response => {
-          })
           this.detailData = {
             seeDisabled: true,
             id: row.id,

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

@@ -72,12 +72,14 @@
                   v-model="form[item.prop]"
                   corpType="GYS"
                   :disabled="detailData.seeDisabled || receiveDisabled"
+                  @getCorpData="returnBack"
                 ></crop-select>
                 <crop-select
                   v-else-if="item.prop === 'salesCompany'"
                   v-model="form[item.prop]"
                   corpType="GS"
                   :disabled="detailData.seeDisabled || receiveDisabled"
+                  @getCorpData="getGSName"
                 ></crop-select>
 <!--                <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"-->
 <!--                                 :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
@@ -791,11 +793,7 @@ export default {
       this.configuration.dicData = this.form.corpName
       delete this.form.corpName
       this.$set(this.form, 'deliveryStatus', '录入')
-      if (this.form.belongToCorpList) {
-        this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
-        delete this.form.belongToCorpId
-        this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.belongToCorpList)
-      }
+      this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
       delete this.form.belongToCorpList
       this.$set(this.form, 'deliveryAmount', 0)
       this.$set(this.form, 'totalQuantity', 0)
@@ -1380,6 +1378,9 @@ export default {
                 })
               })
             }
+          }).catch(() => {
+            this.pageLoading = false
+            this.saveLoading = false
           })
         }
       });
@@ -1490,6 +1491,14 @@ export default {
         this.saveLoading = false
       })
     },
+    returnBack(data) {
+      if (data.belongtocompany) {
+        // this.form.salesCompany = data.belongtocompany
+      }
+    },
+    getGSName(row) {
+      this.form.belongCompany = row.cname
+    },
   }
 }
 </script>

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

@@ -366,8 +366,7 @@
               <el-button type="warning"
                          icon="el-icon-plus"
                          size="small"
-                         :disabled="selection.length < 1 || detailData.seeDisabled || !form.status || form.status < 3
-                         || (Number(form.debitAmount) < Number(form.settlmentAmount))"
+                         :disabled="selection.length < 1 || detailData.seeDisabled || !form.status || form.status < 3"
                          @click="getShipmentD"
                          v-show="goodsActives == 'goods'">生成客户确认
               </el-button>
@@ -733,6 +732,7 @@
         :billType="billType"
         :billData="{}"
         :arrList="applyPaymentList"
+        :belongCompany="form.belongCompany"
         @choceFun="choceFun"
       >
       </financial-account>
@@ -2008,7 +2008,7 @@ export default {
         }
       }
       if (this.$store.getters.inStatus) {
-        this.$alert("发货单存在,请保存发货单再进行操作", "温馨提示", {
+        this.$alert("客户确认存在,请保存客户确认再进行操作", "温馨提示", {
           confirmButtonText: "确定",
           type: "warning",
           callback: action => {
@@ -2050,6 +2050,9 @@ export default {
           });
         })
       } else {
+        // if (Number(this.form.debitAmount) > Number(this.form.settlmentAmount)) {
+        //   return this.$message.error('已收款小于未收款,不能生成客户确认单')
+        // }
         let lsit = []
         this.selection = this.selection.concat(this.giftData)
         this.selection.forEach(item => {
@@ -2108,6 +2111,7 @@ export default {
       let arr = [];
       this.billType = type
       this.billData = {
+        belongCompany: this.form.belongCompany,
         srcOrderno:this.form.orgOrderNo,
         itemType:"销售",
         corpsName:this.form.corpName,
@@ -2200,6 +2204,10 @@ export default {
         })
         this.$set(this.form, 'chargeMember', arr[0])
       }
+      if (data.belongtocompany) {
+        // this.form.belongToCorpId = data.belongtocompany
+        // this.returnBack({id: this.form.belongToCorpId})
+      }
       getCorpDetail({corpId:data.id}).then(res => {
         this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
       })
@@ -3083,6 +3091,7 @@ export default {
       }
     },
     returnBack(row) {
+      this.form.belongCompany = row.cname
       getlistBankBy(row.id).then(res =>{
         this.$set(this.form, 'banks', null)
         this.$set(this.form, 'banksAccountName', null)
@@ -3186,6 +3195,7 @@ export default {
           if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
             || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
             || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
+            || item.prop == 'shopQuality'
           ) {
             item.hide = false;
             item.showColumn = true;
@@ -3208,6 +3218,7 @@ export default {
           if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
             || item.prop == 'actualQuantity' || item.prop == 'storageQuantity'
             || item.prop == 'purchaseAmount' || item.prop == 'price' || item.prop == 'amount'
+            || item.prop == 'shopQuality'
           ) {
             item.hide = true;
             item.showColumn = false;

+ 0 - 30
src/views/businessManagement/salesOrder/index.vue

@@ -136,36 +136,6 @@ export default {
     }
   },
   async created() {
-    const os = require("os")
-    const cpus = os.cpus();
-    console.log(os)
-    console.log(os.cpus())
-    cpus.forEach((cpu,idx,arr)=>{
-      var times = cpu.times;
-      console.log(cpu)
-      console.log(`cpu${idx}:`);
-      console.log(`型号:${cpu.model}`);
-      console.log(`频率:${cpu.speed}MHz`);
-      console.log(`使用率:${((1-times.idle/(times.idle+times.user+times.nice+times.sys+times.irq))*100).toFixed(2)}%`);
-    });
-
-    const getIP = () => {
-      const interfaces = os.networkInterfaces();
-      console.log('interfaces:', interfaces)
-      for (let devName in interfaces) {
-        const iface = interfaces[devName];
-        console.log('iface:', iface)
-        for (let i = 0; i < iface.length; i++) {
-          const alias = iface[i];
-          console.log('alias:', alias)
-          if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal && alias.netmask === '255.255.255.0') {
-            return alias.address;
-          }
-        }
-      }
-    }
-    console.log(getIP())
-
     this.search.businesDate = defaultDate(1)
     // this.option = option
     this.option = await this.getColumnData(this.getColumnName(14), option);

+ 25 - 0
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -44,6 +44,15 @@
               style="width: 100%"
             ></crop-select>
           </template>
+          <template slot="salesCompany">
+            <crop-select
+              v-model="form.salesCompany"
+              corpType="GS"
+              :disabled="(!financeDisabled && form.id) || editDisable"
+              @getCorpData="getGSName"
+              style="width: 100%"
+            ></crop-select>
+          </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
                        placeholder="请选择"
@@ -234,6 +243,19 @@
               ]
             },
             {
+              label: '所属公司',
+              prop: 'salesCompany',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
               label: '银行账号',
               prop: 'accountNo',
               span: 8,
@@ -731,6 +753,9 @@
           this.buttonLoading = false
         })
       },
+      getGSName(row) {
+        this.form.belongCompany = row.cname
+      },
     }
   }
 </script>

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

@@ -49,6 +49,15 @@
               style="width: 100%"
             ></crop-select>
           </template>
+          <template slot="salesCompany">
+            <crop-select
+              v-model="form.salesCompany"
+              corpType="GS"
+              :disabled="!financeDisabled || editDisable"
+              @getCorpData="getGSName"
+              style="width: 100%"
+            ></crop-select>
+          </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
                        placeholder="请选择"
@@ -231,7 +240,20 @@
               span: 8,
               rules: [
                 {
-                  required: false,
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '所属公司',
+              prop: 'salesCompany',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -758,6 +780,9 @@
           this.buttonLoading = false
         })
       },
+      getGSName(row) {
+        this.form.belongCompany = row.cname
+      },
     }
   }
 </script>