瀏覽代碼

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 年之前
父節點
當前提交
f5520b377b
共有 21 個文件被更改,包括 259 次插入207 次删除
  1. 1 1
      src/views/basicData/productInformation/configuration/mainList.json
  2. 1 1
      src/views/basicData/productInformation/detailsPageEdit.vue
  3. 1 1
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  4. 19 15
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  5. 1 1
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  6. 8 8
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  7. 1 1
      src/views/businessManagement/receipt/configuration/customerContact.json
  8. 18 15
      src/views/businessManagement/receipt/detailsPageEdit.vue
  9. 1 1
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  10. 10 6
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  11. 30 14
      src/views/importTrade/receipt/config/customerContact.json
  12. 31 31
      src/views/importTrade/receipt/detailsPageEdit.vue
  13. 1 1
      src/views/maintenance/goodsOnTheShelves/configuration/mainList.json
  14. 4 3
      src/views/orderManagement/orderList/index.vue
  15. 1 1
      src/views/orderManagement/refund/index.vue
  16. 16 1
      src/views/purchase/contract/config/customerContact.json
  17. 5 10
      src/views/purchase/contract/config/mainList.json
  18. 27 15
      src/views/purchase/contract/detailsPage.vue
  19. 56 37
      src/views/salesManagement/salesContract/config/importInventory.json
  20. 1 1
      src/views/salesManagement/salesContract/config/mainList.json
  21. 26 43
      src/views/salesManagement/salesContract/detailsPage.vue

+ 1 - 1
src/views/basicData/productInformation/configuration/mainList.json

@@ -69,7 +69,7 @@
     },
     {
       "label": "规格尺寸",
-      "prop": "specs",
+      "prop": "typeno",
       "width": 100
     },
     {

+ 1 - 1
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -124,7 +124,7 @@ export default {
           },
           {
             label: "规格",
-            prop: "specs",
+            prop: "typeno", //specs
             span: 8,
             rules: [
               {

+ 1 - 1
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -85,7 +85,7 @@
       ]
     },{
       "label": "规格型号",
-      "prop": "specificationAndModel",
+      "prop": "typeno",
       "index": 4,
       "width":100,
       "cell": false,

+ 19 - 15
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -50,18 +50,18 @@
                 <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
                 </el-select>
-                <avue-input-tree
-                  v-else-if="item.prop === 'warehouseType'"
-                  leaf-only
-                  placeholder="请选择内容"
-                  :dic="warehouseType"
-                  type="tree"
-                  v-model="form[item.prop]"
-                  style="width: 100%"
-                  size="small"
-                  @change="warehouseTreeChange"
-                >
-                </avue-input-tree>
+<!--                <avue-input-tree-->
+<!--                  v-else-if="item.prop === 'warehouseType'"-->
+<!--                  leaf-only-->
+<!--                  placeholder="请选择内容"-->
+<!--                  :dic="warehouseType"-->
+<!--                  type="tree"-->
+<!--                  v-model="form[item.prop]"-->
+<!--                  style="width: 100%"-->
+<!--                  size="small"-->
+<!--                  @change="warehouseTreeChange"-->
+<!--                >-->
+<!--                </avue-input-tree>-->
                 <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
                 </el-select>
@@ -563,6 +563,10 @@ export default {
       }
       this.warehouseType = result
     });
+    selectWareHouse().then(res => {
+      console.log(res)
+      this.warehouseName = res.data.data.records
+    })
     if (this.detailData.id) {
       let id = this.detailData.id
       this.queryData(id)
@@ -762,7 +766,7 @@ export default {
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         selectGoodsNum({
           goodsId: this.tableData[0].id,
-          typeno: this.tableData[0].specs
+          typeno: this.tableData[0].typeno
         }).then(res => {
           this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
         })
@@ -807,10 +811,10 @@ export default {
           console.log(this.tableData[item])
           selectGoodsNum({
             goodsId: this.tableData[item].id,
-            typeno: this.tableData[item].specs
+            typeno: this.tableData[item].typeno
           }).then(res =>{
             this.tableData[item].storageQuantity =  res.data.data
-            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
             this.tableData[item].itemId = this.tableData[item].id
             this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
             delete this.tableData[item].goodsTypeName

+ 1 - 1
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -81,7 +81,7 @@
       ]
     },{
       "label": "规格型号",
-      "prop": "specificationAndModel",
+      "prop": "typeno",
       "index": 4,
       "width":100,
       "cell": false,

+ 8 - 8
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -787,7 +787,7 @@ export default {
     rowCell(row, index) {
       console.log(row)
       if (row.$cellEdit) {
-        if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
+        if (Number(row.purchaseQuantity) < Number(row.actualQuantity)) {
           return this.$message.error('订货数量不能小于发货数量')
         }
       }
@@ -836,12 +836,12 @@ export default {
         this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
-        this.contactsData[this.choiceIndexT].orderQuantity = 0
+        this.contactsData[this.choiceIndexT].purchaseQuantity = 0
         this.contactsData[this.choiceIndexT].price = 0
         this.contactsData[this.choiceIndexT].amount = 0
         selectGoodsNum({
           goodsId: this.tableData[0].id,
-          typeno: this.tableData[0].specs
+          typeno: this.tableData[0].typeno
         }).then(res => {
           this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
         })
@@ -886,15 +886,15 @@ export default {
         for (let item in this.tableData) {
           selectGoodsNum({
             goodsId: this.tableData[item].id,
-            typeno: this.tableData[item].specs
+            typeno: this.tableData[item].typeno
           }).then(res => {
-            this.tableData[item].storageQuantity =  res.data.data
+            this.$set(this.tableData[item], 'storageQuantity', res.data.data)
             this.tableData[item].itemId = this.tableData[item].id
             this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
             delete this.tableData[item].id
-            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
             this.$set(this.tableData[item], 'priceType', '一般')
-            this.$set(this.tableData[item], 'orderQuantity', 0)
+            this.$set(this.tableData[item], 'purchaseQuantity', 0)
             this.$set(this.tableData[item], 'actualQuantity', 0)
             this.tableData[item].price = 0
             this.tableData[item].amount = 0
@@ -1119,7 +1119,7 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           for (let item in this.contactsData) {
-            if (Number(this.contactsData[item].orderQuantity) < Number(this.contactsData[item].actualQuantity)) {
+            if (Number(this.contactsData[item].purchaseQuantity) < Number(this.contactsData[item].actualQuantity)) {
               return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
             }
           }

+ 1 - 1
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -86,7 +86,7 @@
       ]
     },{
       "label": "规格型号",
-      "prop": "specificationAndModel",
+      "prop": "typeno",
       "index": 4,
       "width":100,
       "cell": false,

+ 18 - 15
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -50,18 +50,18 @@
                 <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in procurementMethodOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
-                <avue-input-tree
-                  v-else-if="item.prop === 'warehouseType'"
-                  leaf-only
-                  placeholder="请选择内容"
-                  :dic="warehouseType"
-                  type="tree"
-                  v-model="form[item.prop]"
-                  style="width: 100%"
-                  size="small"
-                  @change="warehouseTreeChange"
-                >
-                </avue-input-tree>
+<!--                <avue-input-tree-->
+<!--                  v-else-if="item.prop === 'warehouseType'"-->
+<!--                  leaf-only-->
+<!--                  placeholder="请选择内容"-->
+<!--                  :dic="warehouseType"-->
+<!--                  type="tree"-->
+<!--                  v-model="form[item.prop]"-->
+<!--                  style="width: 100%"-->
+<!--                  size="small"-->
+<!--                  @change="warehouseTreeChange"-->
+<!--                >-->
+<!--                </avue-input-tree>-->
                 <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
                 </el-select>
@@ -565,6 +565,9 @@ export default {
       }
       this.warehouseType = result
     });
+    selectWareHouse().then(res => {
+      this.warehouseName = res.data.data.records
+    })
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     }else if (this.detailData.form){
@@ -759,7 +762,7 @@ export default {
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         selectGoodsNum({
           goodsId: this.tableData[0].id,
-          typeno: this.tableData[0].specs
+          typeno: this.tableData[0].typeno
         }).then(res => {
           this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
         })
@@ -804,7 +807,7 @@ export default {
         for (let item in this.tableData) {
           selectGoodsNum({
             goodsId: this.tableData[item].id,
-            typeno: this.tableData[item].specs
+            typeno: this.tableData[item].typeno
           }).then(res => {
             this.tableData[item].storageQuantity =  res.data.data
             this.tableData[item].itemId = this.tableData[item].id
@@ -813,7 +816,7 @@ export default {
             delete this.tableData[item].id
             delete this.tableData[item].status
             delete this.tableData[item].isDeleted
-            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
             this.$set(this.tableData[item], 'purchaseQuantity', 0)
             this.$set(this.tableData[item], 'actualQuantity', 0)
             this.$set(this.tableData[item], 'purchaseAmount', 0)

+ 1 - 1
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -94,7 +94,7 @@
       ]
     },{
       "label": "规格型号",
-      "prop": "specificationAndModel",
+      "prop": "typeno",
       "index": 4,
       "width":100,
       "cell": true,

+ 10 - 6
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1087,7 +1087,11 @@ export default {
           goodsNum.push(item.sort)
           purchaseAmount += Number(item.purchaseAmount)
         })
-        // this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed()
+        if (Number(this.form.grossProfit) != 0) {
+          this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed(2)
+        } else {
+          this.form.grossProfitRate = '0.00'
+        }
         if (goodsNum.length == 0) {
           this.maxGoodsNum = 0;
         } else {
@@ -1233,12 +1237,12 @@ export default {
         this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
         this.contactsData[this.choiceIndexT].code = this.tableData[0].code
         this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
-        this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specs
+        this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
         this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
         selectGoodsNum({
           goodsId: this.tableData[0].id,
-          typeno: this.tableData[0].specs
+          typeno: this.tableData[0].typeno
         }).then(res => {
           this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
         })
@@ -1284,13 +1288,13 @@ export default {
           // this.$set(this.tableData[item], 'storageQuantity', 0)
           selectGoodsNum({
             goodsId: this.tableData[item].id,
-            typeno: this.tableData[item].specs
+            typeno: this.tableData[item].typeno
           }).then(res => {
             this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
             this.tableData[item].storageQuantity =  res.data.data
             delete this.tableData[item].goodsTypeName
             this.tableData[item].itemId = this.tableData[item].id
-            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specificationAndModel)
             this.$set(this.tableData[item], 'priceType', '一般')
             this.$set(this.tableData[item], 'orderQuantity', 0)
             this.$set(this.tableData[item], 'actualQuantity', 0)
@@ -1389,7 +1393,7 @@ export default {
       for (let item in list) {
         selectGoodsNum({
           goodsId: list[item].id,
-          typeno: list[item].specs
+          typeno: list[item].typeno
         }).then(res => {
           this.$set(list[item], 'storageQuantity', res.data.data)
         })

+ 30 - 14
src/views/importTrade/receipt/config/customerContact.json

@@ -16,9 +16,26 @@
   "tree": true,
   "border": true,
   "index": true,
+  "selectionFixed": false,
   "selection": true,
   "menuWidth": 220,
   "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "contractAmount",
+      "type": "sum"
+    },
+    {
+      "name": "billWeight",
+      "type": "sum"
+    },
+    {
+      "name": "invoiceWeight",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "提单号",
@@ -58,13 +75,13 @@
       ]
     },
    {
-      "label": "数",
+      "label": "数",
       "prop": "actualQuantity",
       "index": 4,
       "width":120
     },{
-      "label": "单价",
-      "prop": "price",
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
       "index": 5,
       "width":120,
       "rules": [
@@ -74,9 +91,10 @@
           "trigger": "blur"
         }
       ]
-    },{
-      "label": "合同金额",
-      "prop": "contractAmount",
+    },
+    {
+      "label": "发票净重(吨)",
+      "prop": "invoiceWeight",
       "index": 6,
       "width":120,
       "rules": [
@@ -87,11 +105,10 @@
         }
       ]
     },{
-      "label": "发票净重(吨)",
-      "prop": "invoiceWeight",
-      "index": 8,
+      "label": "单价",
+      "prop": "price",
+      "index": 7,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,
@@ -100,11 +117,10 @@
         }
       ]
     },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
-      "index": 9,
+      "label": "合同金额",
+      "prop": "contractAmount",
+      "index": 8,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,

+ 31 - 31
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -103,27 +103,28 @@
               <el-button v-if="row.$cellEdit" size="small" icon="el-icon-search" @click="choice(row)"></el-button>
               <span v-else>{{ row.priceCategoryNames }}</span>
             </template>
-            <template slot="invoiceWeight" slot-scope="{ row }">
+            <template slot="billWeight" slot-scope="{ row }">
               <el-input
                 v-if="row.$cellEdit"
-                v-model="row.invoiceWeight"
+                v-model="row.billWeight"
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.invoiceWeight)"
+                @change="totalChange(row.billWeight)"
               ></el-input>
-              <span v-else>{{ row.invoiceWeight }}</span>
+              <span v-else>{{ row.billWeight }}</span>
             </template>
-            <template slot="billWeight" slot-scope="{ row }">
+            <template slot="invoiceWeight" slot-scope="{ row }">
               <el-input
                 v-if="row.$cellEdit"
-                v-model="row.billWeight"
+                v-model="row.invoiceWeight"
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.billWeight)"
+                @input="invoiceWeightChange(row)"
+                @change="totalChange(row.invoiceWeight)"
               ></el-input>
-              <span v-else>{{ row.billWeight }}</span>
+              <span v-else>{{ row.invoiceWeight }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -145,7 +146,6 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-                @input="quantityChange(row)"
               ></el-input>
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
@@ -369,9 +369,10 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },  {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+          },
+          {
+            label: '码单重量',
+            prop: 'billWeight',
             disabled: true,
             rules: [
               {
@@ -382,8 +383,8 @@ export default {
             ]
           },
           {
-            label: '码单重量',
-            prop: 'billWeight',
+            label: '发票重量',
+            prop: 'invoiceWeight',
             disabled: true,
             rules: [
               {
@@ -464,9 +465,7 @@ export default {
         this.oldForm = Object.assign({},res.data.data);
         this.receiptDisable = res.data.data.deliveryStatus === "已收货" ?   true :false
         this.configuration.disabled = this.receiptDisable
-        if(this.form.companyName){
-          this.configuration.dicData = this.form.companyName
-        }
+        this.configuration.dicData = this.form.corpName
         if(this.form.deliveryItemsList){
           this.contactsData = this.form.deliveryItemsList
           this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
@@ -508,7 +507,7 @@ export default {
   methods: {
     sumOrderNo(){
       //拿到所有明细合同号 去重加逗号放到主表合同号
-      const contractNumberList =  this.contactsData.map(item =>{item.contractNumber})
+      const contractNumberList =  this.contactsData.map(item =>{return  item.contractNumber})
       this.$set(this.form,'orderNo', Array.from(new Set(contractNumberList)).join(","))
     },
     //合计
@@ -525,8 +524,8 @@ export default {
         }
         return parseFloat(item.billWeight);
       });
-      this.form.invoiceWeight = invoiceList.reduce((n,m) => n + m)
-      this.form.billWeight = billList.reduce((n,m) => n + m)
+      this.$set(this.form,"invoiceWeight",invoiceList.reduce((n,m) => n + m))
+      this.$set(this.form,"billWeight",billList.reduce((n,m) => n + m))
     },
     //提单号带出合同号
     bingOut(row){
@@ -546,16 +545,16 @@ export default {
         row.price = "";
         row.contractAmount = 0
       } else {
-        row.contractAmount = _.multiply(row.actualQuantity,row.price).toFixed(2);
+        row.contractAmount = _.multiply(row.invoiceWeight,row.price).toFixed(2);
       }
     },
-    //件数
-    quantityChange(row) {
-      if (!row.actualQuantity) {
-        row.actualQuantity = "";
+    //码单重量
+    invoiceWeightChange(row) {
+      if (!row.invoiceWeight) {
+        row.invoiceWeight = "";
         row.contractAmount = 0
       } else {
-        row.contractAmount = _.multiply(row.actualQuantity,row.price).toFixed(2);
+        row.contractAmount = _.multiply(row.invoiceWeight,row.price).toFixed(2);
       }
     },
     //新增商品信息保存触发
@@ -613,10 +612,10 @@ export default {
             return this.$message.error(`请输入第${i + 1}行的货物品种`);
           }
           if (this.contactsData[i].actualQuantity === "") {
-            return this.$message.error(`请输入第${i + 1}行的数`);
+            return this.$message.error(`请输入第${i + 1}行的数`);
           }
           if (this.contactsData[i].actualQuantity == 0) {
-            return this.$message.error(`请输入第${i + 1}行的数`);
+            return this.$message.error(`请输入第${i + 1}行的数量不能为0`);
           }
         }
         if (valid) {
@@ -632,7 +631,7 @@ export default {
                 this.form = res.data.data;
                 this.oldForm = Object.assign({},res.data.data);
                 this.receiptDisable = res.data.data.deliveryStatus === "已收货" ?   true :false
-                this.configuration.dicData = this.form.companyName
+                this.configuration.dicData = this.form.corpName
                 if(this.form.deliveryItemsList){
                   this.contactsData = this.form.deliveryItemsList
                   this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
@@ -704,7 +703,8 @@ export default {
         item.actualQuantity = item.purchaseQuantity;
         this.$refs.crudContact.rowCellAdd(item);
       })
-      this.sumOrderNo();
+      this.totalChange();  //计算码单 发票
+      this.sumOrderNo();   //合并合同号
       this.procurementDialog = false;
     },
     //上传文件保存
@@ -853,7 +853,7 @@ export default {
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
   },

+ 1 - 1
src/views/maintenance/goodsOnTheShelves/configuration/mainList.json

@@ -69,7 +69,7 @@
     },
     {
       "label": "规格尺寸",
-      "prop": "specs",
+      "prop": "typeno",
       "width": 100
     },
     {

+ 4 - 3
src/views/orderManagement/orderList/index.vue

@@ -12,7 +12,7 @@
           <li @click="changeTags('已取消')"><span :class="{'active': tagsName == '已取消'}">已取消<div v-if="tagsName == '已取消'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
           <li @click="changeTags('售后中')"><span :class="{'active': tagsName == '售后中'}">售后中<div v-if="tagsName == '售后中'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
           <li @click="changeTags('售后结束')"><span :class="{'active': tagsName == '售后结束'}">售后结束<div v-if="tagsName == '售后结束'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
-          <li @click="changeTags('全部')"><span :class="{'active': tagsName == '全部'}">全部<div v-if="tagsName == '全部'" class="active_bot el-button--primary"></div></span> <span class="orderNum" style="background: #000;color: #fff">0</span></li>
+          <li style="position: absolute;right: 20px" @click="changeTags('全部')"><span :class="{'active': tagsName == '全部'}">全部<div v-if="tagsName == '全部'" class="active_bot el-button--primary"></div></span> <span class="orderNum" style="background: #000;color: #fff">0</span></li>
         </ul>
       </div>
       <!--    分割线-->
@@ -50,7 +50,7 @@ export default {
     return {
       option: option,
       dataList: [{orderNo: '00001'}],
-      tagsName: '待付款',
+      tagsName: '全部',
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -95,7 +95,7 @@ export default {
   margin: 0;
   padding: 0 10px;
   display: flex;
-  justify-content: space-between;
+  justify-content: flex-start;
   li {
     list-style: none;
     font-size: 14px;
@@ -104,6 +104,7 @@ export default {
     align-items: center;
     position: relative;
     cursor: pointer;
+    margin-left: 30px;
     .orderNum {
       display: inline-block;
       font-size: 14px;

+ 1 - 1
src/views/orderManagement/refund/index.vue

@@ -7,7 +7,7 @@
           <li @click="changeTags('处理中')"><span :class="{'active': tagsName == '处理中'}">处理中<div v-if="tagsName == '处理中'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
           <li @click="changeTags('已退款')"><span :class="{'active': tagsName == '已退款'}">已退款<div v-if="tagsName == '已退款'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
           <li @click="changeTags('拒绝退款')"><span :class="{'active': tagsName == '拒绝退款'}">拒绝退款<div v-if="tagsName == '拒绝退款'" class="active_bot el-button--primary"></div></span> <span class="orderNum el-button--primary">0</span></li>
-          <li style="position: absolute;right: 15px" @click="changeTags('全部')"><span :class="{'active': tagsName == '全部'}">全部<div v-if="tagsName == '全部'" class="active_bot el-button--primary"></div></span> <span class="orderNum" style="background: #000;color: #fff">0</span></li>
+          <li style="position: absolute;right: 20px" @click="changeTags('全部')"><span :class="{'active': tagsName == '全部'}">全部<div v-if="tagsName == '全部'" class="active_bot el-button--primary"></div></span> <span class="orderNum" style="background: #000;color: #fff">0</span></li>
         </ul>
       </div>
       <!--    分割线-->

+ 16 - 1
src/views/purchase/contract/config/customerContact.json

@@ -19,6 +19,22 @@
   "selection": true,
   "menuWidth": 180,
   "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "billWeight",
+      "type": "sum"
+    },
+    {
+      "name": "invoiceWeight",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "提单号",
@@ -38,7 +54,6 @@
       "prop": "priceCategory",
       "index": 2,
       "width":200,
-      "cell": false,
       "rules": [
         {
           "required": true,

+ 5 - 10
src/views/purchase/contract/config/mainList.json

@@ -16,18 +16,11 @@
   "delBtn": false,
   "menuWidth": 220,
   "dialogClickModal": false,
-  "searchLabelWidth": 140,
+  "searchLabelWidth": 60,
   "addBtnText": "新单",
   "expand": true,
-  "rowKey": "id",
-  "showSummary": true,
-  "summaryText": "合计",
-  "sumColumnList": [
-    {
-      "name": "orderAmount",
-      "type": "sum"
-    }
-  ],
+  "searchIcon": true,
+  "searchIndex": 3,
   "column":[
     {
       "label": "合同号",
@@ -65,6 +58,7 @@
       "label": "付款日期/开证日期",
       "prop": "accountsCollectionDate",
       "type": "date",
+      "search": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "unlinkPanels": true,
@@ -84,6 +78,7 @@
     },{
       "label": "合同金额",
       "prop": "orderAmount",
+      "search": true,
       "index": 7,
       "width":100
     },{

+ 27 - 15
src/views/purchase/contract/detailsPage.vue

@@ -117,7 +117,6 @@
                 size="small"
                 style="width: 93%"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-                @input="quantityChange(row)"
               ></el-input>
               <span v-else>{{ row.purchaseQuantity }}</span>
             </template>
@@ -139,7 +138,8 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.invoiceWeight)"
+                @input="invoiceWeightChange(row)"
+                @change="totalChange(row.invoiceWeight)"
               ></el-input>
               <span v-else>{{ row.invoiceWeight }}</span>
             </template>
@@ -150,7 +150,7 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.billWeight)"
+                @change="totalChange(row.billWeight)"
               ></el-input>
               <span v-else>{{ row.billWeight }}</span>
             </template>
@@ -706,8 +706,8 @@ export default {
         }
       })
     }else{
-      this.$set(this.form,"currency","人民币")
-      this.$set(this.form,"exchangeRate",1)
+      this.$set(this.form,"currency","美元")
+      this.$set(this.form,"exchangeRate",6.3843)
     }
   },
   components: {
@@ -721,9 +721,19 @@ export default {
         row.price = "";
         row.amount = 0
       } else {
-        row.amount = _.multiply(row.purchaseQuantity, row.price).toFixed(2);
+        row.amount = _.multiply(row.invoiceWeight, row.price).toFixed(2);
       }
     },
+    //发票净重
+    invoiceWeightChange(row) {
+      if (!row.invoiceWeight) {
+        row.invoiceWeight = "";
+        row.amount = 0
+      } else {
+        row.amount = _.multiply(row.invoiceWeight, row.price).toFixed(2);
+      }
+    },
+    //带出人民币
     currencyChange(){
       if(this.form.orderAmount){
         if(this.form.currency === "人民币"){
@@ -755,14 +765,14 @@ export default {
       this.form.billWeight = billList.reduce((n,m) => n + m)
     },
     //件数
-    quantityChange(row) {
-      if (!row.purchaseQuantity) {
-        row.purchaseQuantity = "";
-        row.amount = 0
-      } else {
-        row.amount =_.multiply(row.purchaseQuantity,row.price).toFixed(2);
-      }
-    },
+    // quantityChange(row) {
+    //   if (!row.purchaseQuantity) {
+    //     row.purchaseQuantity = "";
+    //     row.amount = 0
+    //   } else {
+    //     row.amount =_.multiply(row.purchaseQuantity,row.price).toFixed(2);
+    //   }
+    // },
     //修改提交触发
     editCustomer(status) {
       this.$refs["form"].validate((valid) => {
@@ -917,6 +927,8 @@ export default {
         this.contactsData[this.selectKind].priceCategory = this.tableData[0].id;
         this.contactsData[this.selectKind].itemId = this.tableData[0].id;
         this.$set(this.contactsData[this.selectKind],'priceCategoryNames',this.tableData[0].cname)
+        this.$set(this.contactsData[this.selectKind],'itemDescription',this.tableData[0].cnameDescription) //英文描述
+        //根据选择的商品id 带出规格型号
         getSpecification({ goodId: this.tableData[0].id}).then(res =>{
           this.$set(this.contactsData[this.selectKind],'itemType',res.data.data.map(item =>item)[0])
           this.$set(this.contactsData[this.selectKind],'specificationList',res.data.data.map(item => ({ value: item })))
@@ -1084,7 +1096,7 @@ export default {
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
   }

+ 56 - 37
src/views/salesManagement/salesContract/config/importInventory.json

@@ -18,6 +18,22 @@
   "selection": true,
   "menuWidth": 220,
   "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "billWeight",
+      "type": "sum"
+    },
+    {
+      "name": "invoiceWeight",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "提单号",
@@ -48,10 +64,11 @@
       "prop": "priceCategory",
       "index": 3,
       "width":200
-    },{
-      "label": "件数",
+    },
+    {
+      "label": "数量",
       "prop": "orderQuantity",
-      "index": 4,
+      "index": 5,
       "width":120,
       "rules": [
         {
@@ -60,63 +77,65 @@
           "trigger": "blur"
         }
       ]
-    },{
-      "label": "单价",
-      "prop": "price",
-      "index": 5,
+    },
+    {
+      "label": "已发数量",
+      "prop": "actualQuantity",
+      "index": 6,
+      "width":120
+    },
+    {
+      "label": "库存",
+      "prop": "kucun",
+      "index": 4,
+      "width":120
+    },
+    {
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
+      "index": 7,
       "width":120,
       "rules": [
         {
           "required": false,
-          "message": "请输入单价",
+          "message": "请输入码单重量(吨)",
           "trigger": "blur"
         }
       ]
-    },{
-      "label": "合同金额",
-      "prop": "amount",
-      "index": 6,
+    },
+    {
+      "label": "发票净重(吨)",
+      "prop": "invoiceWeight",
+      "index": 8,
       "width":120,
       "rules": [
         {
           "required": false,
-          "message": "请输入合同金额",
+          "message": "请输入发票净重(吨)",
           "trigger": "blur"
         }
       ]
-    }, {
-      "label": "库存",
-      "prop": "kucun",
-      "index": 7,
-      "width":120
-    },
-    {
-      "label": "发货数量",
-      "prop": "actualQuantity",
-      "index": 8,
-      "width":120
-    },
-    {
-      "label": "发票净重(吨)",
-      "prop": "invoiceWeight",
-      "index": 10,
+    },{
+      "label": "单价",
+      "prop": "price",
+      "index": 9,
       "width":120,
       "rules": [
         {
           "required": false,
-          "message": "请输入发票净重(吨)",
+          "message": "请输入单价",
           "trigger": "blur"
         }
       ]
     },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
-      "index": 11,
+      "label": "合同金额",
+      "prop": "amount",
+      "index": 10,
       "width":120,
       "rules": [
         {
           "required": false,
-          "message": "请输入码单重量(吨)",
+          "message": "请输入合同金额",
           "trigger": "blur"
         }
       ]
@@ -124,7 +143,7 @@
     {
       "label": "货物详情",
       "prop": "cname",
-      "index": 12,
+      "index": 11,
       "width":120,
       "cell": true,
       "rules": [
@@ -137,7 +156,7 @@
     },{
       "label": "税率",
       "prop": "taxRate",
-      "index": 13,
+      "index": 12,
       "width":120,
       "cell": true,
       "rules": [
@@ -150,7 +169,7 @@
     }, {
       "label": "备注",
       "prop": "remarks",
-      "index": 14,
+      "index": 13,
       "width":200,
       "cell": true,
       "rules": [

+ 1 - 1
src/views/salesManagement/salesContract/config/mainList.json

@@ -36,7 +36,7 @@
     },{
       "label": "合同金额",
       "prop": "orderAmount",
-      "search": false,
+      "search": true,
       "index": 5,
       "width":120
     },{

+ 26 - 43
src/views/salesManagement/salesContract/detailsPage.vue

@@ -31,7 +31,7 @@
           <el-row>
             <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:8" :key="index">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
-                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
+                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option
                     v-for="(data, index) in item.dicData"
@@ -45,7 +45,9 @@
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
                 <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="bConfiguration"/>
-                <port-info  v-else-if="(item.prop === 'portOfDestination' || item.prop === 'portOfLoad'  )"  v-model="form[item.prop]"></port-info>
+                <el-input type="age" v-else-if="item.prop === 'downPayment'" v-model="form[item.prop]"    :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
+                  <template slot="append">%</template>
+                </el-input>
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" :disabled="item.disabled?true:false" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
@@ -109,7 +111,6 @@
               <span v-else>{{ row.price }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{ row }">
-              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.orderQuantity"
@@ -117,7 +118,6 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-                @input="quantityChange(row)"
               ></el-input>
               <span v-else>{{ row.orderQuantity }}</span>
             </template>
@@ -141,7 +141,8 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.invoiceWeight)"
+                @input="invoiceWeightChange(row)"
+                @change="totalChange(row.invoiceWeight)"
               ></el-input>
               <span v-else>{{ row.invoiceWeight }}</span>
             </template>
@@ -152,7 +153,7 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="totalChange(row.billWeight)"
+                @change="totalChange(row.billWeight)"
               ></el-input>
               <span v-else>{{ row.billWeight }}</span>
             </template>
@@ -339,7 +340,7 @@ export default {
               }
             ]
           }, {
-            label: '订单号',
+            label: '合同号',
             prop: 'orderNo',
             rules: [
               {
@@ -349,7 +350,7 @@ export default {
               }
             ]
           }, {
-            label: '订单日期',
+            label: '合同日期',
             prop: 'businesDate',
             type:'datetime',
             data: [],
@@ -360,18 +361,6 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '业务员',
-            prop: 'salesName',
-            // type:'select',
-            dicData: [],
-            rules: [
-              {
-                required: false,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
           },  {
             label: '客户名称',
             prop: 'corpId',
@@ -382,9 +371,10 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },  {
-            label: '发票号(PI)',
-            prop: 'proformInvoice',
+          },{
+            label: '业务员',
+            prop: 'salesName',
+            dicData: [],
             rules: [
               {
                 required: false,
@@ -412,13 +402,6 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '起运港',
-            prop: 'portOfLoad',
-          },
-          {
-            label: '目的港',
-            prop: 'portOfDestination',
           },
           {
             label: '包装要求',
@@ -478,8 +461,8 @@ export default {
             ]
           },
           {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+            label: '码单重量',
+            prop: 'billWeight',
             disabled: true,
             rules: [
               {
@@ -488,9 +471,9 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '码单重量',
-            prop: 'billWeight',
+          },{
+            label: '发票重量',
+            prop: 'invoiceWeight',
             disabled: true,
             rules: [
               {
@@ -499,7 +482,7 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },{
+          }, {
             label: '销售单价',
             prop: 'salesPrice',
             rules: [
@@ -725,16 +708,16 @@ export default {
         row.price = "";
         row.amount = 0
       } else {
-        row.amount = _.multiply(row.orderQuantity, row.price).toFixed(2);
+        row.amount = _.multiply(row.invoiceWeight, row.price).toFixed(2);
       }
     },
-    //
-    quantityChange(row) {
-      if (!row.orderQuantity) {
-        row.orderQuantity = "";
+    //数
+    invoiceWeightChange(row) {
+      if (!row.invoiceWeight) {
+        row.invoiceWeight = "";
         row.amount = 0
       } else {
-        row.amount =_.multiply(row.orderQuantity,row.price).toFixed(2);
+        row.amount =_.multiply(row.invoiceWeight,row.price).toFixed(2);
       }
     },
     editCustomer(status) {
@@ -1059,7 +1042,7 @@ export default {
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.importInventory.$refs.dialogColumn.columnBox = false;
       }
     },
   },