瀏覽代碼

基础资料bug 进口库存调整

qinbai 3 年之前
父節點
當前提交
820d34f968

+ 25 - 0
src/api/importTrade/receipt.js

@@ -43,3 +43,28 @@ export function removeGoodsItem(data) {
     }
   })
 }
+
+//获取仓库
+export function getStorage() {
+  return request({
+    url: 'api/blade-client/storagedesc/storage/list',
+    method: 'get',
+  })
+}
+
+export function getInventory(data) {
+  return request({
+    url: 'api/blade-deliver-goods/importDelivery/findStockByConditions',
+    method: 'get',
+    data:data
+  })
+}
+
+//确认收货
+export function confirmReceipt(data) {
+  return request({
+    url: 'api/blade-deliver-goods/importReCeVing/comfire',
+    method: 'post',
+    data: data
+  })
+}

+ 75 - 0
src/components/procurement/config/mainList.json

@@ -0,0 +1,75 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":true,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "index": 1,
+      "width":180
+    },{
+      "label": "货物品种",
+      "prop": "priceCategory",
+      "index": 2,
+      "width":120
+    },{
+      "label": "货物详情",
+      "prop": "itemDescription",
+      "index": 3,
+      "width":180
+    },{
+      "label": "箱号",
+      "prop": "containerNo",
+      "index": 4,
+      "width":100
+    },{
+      "label": "发票净重(吨)",
+      "prop": "invoiceWeight",
+      "index": 5,
+      "width":120
+    },{
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
+      "index": 6,
+      "width":120
+    },{
+      "label": "件数",
+      "prop": "purchaseQuantity",
+      "index": 7,
+      "width":120
+    },{
+      "label": "单价",
+      "prop": "price",
+      "index": 8,
+      "width":120
+    },{
+      "label": "合同金额",
+      "prop": "amount",
+      "index": 9,
+      "width":120
+    },{
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 10,
+      "width":120
+    }
+  ]
+}

+ 59 - 0
src/components/procurement/procurementDetail.vue

@@ -0,0 +1,59 @@
+<template>
+    <div>
+      <avue-crud :option="option"
+                 :table-loading="loading"
+                 :data="data"
+                 ref="crud"
+                 @refresh-change="refreshChange"
+                 :page.sync="page"
+                 @on-load="onLoad">
+      </avue-crud>
+       <span slot="footer" class="dialog-footer" >
+          <el-button type="primary"  @click="closeFun()">关 闭</el-button>
+         <el-button type="primary"  @click="closeFun()">导 入</el-button>
+       </span>
+    </div>
+</template>
+
+<script>
+  import option from "./config/mainList.json"
+
+   export default {
+        name: "detail",
+      props:{
+          status:{
+            type:String
+          },
+        closeFun:{
+          type:Function
+        }
+      },
+      data(){
+          return {
+            option:option,
+            loading:false,
+            data:[],
+            page: {
+              pageSize: 10,
+              pagerCount: 5,
+              total: 0,
+            },
+          }
+      },
+      created() {
+
+      },
+      methods:{
+        refreshChange(){
+
+        },
+        onLoad(){
+
+        }
+      }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/components/selectComponent/configuration/mainList.json

@@ -37,7 +37,7 @@
             "prop": "cname",
             "search": true,
             "index": 2,
-            "width":100,
+            "width":180,
             "rules": [
                 {
                     "required": true,
@@ -50,7 +50,7 @@
             "prop": "belongtoarea",
             "search": true,
             "index": 4,
-            "width":100,
+            "width":180,
             "rules": [
                 {
                     "required": true,

+ 6 - 8
src/components/selectComponent/customerSelect.vue

@@ -22,11 +22,9 @@
       title="导入客户"
       :visible.sync="dialogVisible"
       class="el-dialogDeep"
-      top="0vh"
-      bottom="2vh"
       append-to-body
       width="80%">
-    <el-row style="margin-top: -5px;height: 0">
+    <el-row style="height: 0">
       <el-col :span="5">
         <div class="box">
           <el-scrollbar>
@@ -209,9 +207,12 @@ export default {
       })
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
-        console.log(res.data.data.total)
         this.page.total = res.data.data.total
-        console.log(this.page)
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 500;
+        } else {
+          this.option.height = window.innerHeight - 200;
+        }
       })
     },
     //树桩列点击展开触发
@@ -228,9 +229,6 @@ export default {
 <style scoped lang="scss">
 .el-dialogDeep {
   ::v-deep .el-dialog {
-    margin: 1vh auto 0 !important;
-    padding-bottom: 10px !important;
-
     .el-dialog__body, .el-dialog__footer {
       padding-bottom: 0 !important;
       padding-top: 0 !important;

+ 2 - 2
src/page/index/tags.vue

@@ -142,10 +142,10 @@ import {clearCache} from "@/api/user";
             if(tag.label=="国内发货单"){
             this.$store.commit("IN_OUT_DETAIL");
           }
-            if(tag.label=="发货单"){
+            if(tag.label=="发货单(I)"){
             this.$store.commit("GO_OUT_DETAIL");
           }
-          if(tag.label=="收货单"){
+          if(tag.label=="收货单(I)"){
             this.$store.commit("TAKE_OUT_DETAIL");
           }
           if(tag.label=="付款管理"){

+ 1 - 1
src/router/axios.js

@@ -17,7 +17,7 @@ import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 
 //默认超时时间
-axios.defaults.timeout = 10000;
+axios.defaults.timeout = 120000;
 //返回其他状态码
 axios.defaults.validateStatus = function (status) {
   return status >= 200 && status <= 500;

+ 4 - 4
src/router/views/index.js

@@ -239,7 +239,7 @@ export default [{
       children: [
         {
           path: '/purchase/contract/index',
-          name:'采购订单',
+          name:'采购订单(I)',
           meta: {
             i18n: '/purchase/contract/index',
             keepAlive: true
@@ -256,7 +256,7 @@ export default [{
       children: [
         {
           path: '/salesManagement/salesContract/index',
-          name:'销售订单',
+          name:'销售订单(I)',
           meta: {
             i18n: '/salesManagement/salesContract/index',
             keepAlive: true
@@ -273,7 +273,7 @@ export default [{
     children: [
       {
         path: '/importTrade/receipt/index',
-        name:'收货单',
+        name:'收货单(I)',
         meta: {
           i18n: '/importTrade/receipt/index',
           keepAlive: true
@@ -290,7 +290,7 @@ export default [{
     children: [
       {
         path: '/importTrade/invoice/index',
-        name:'发货单',
+        name:'发货单(I)',
         meta: {
           i18n: 'importTrade/invoice/index',
           keepAlive: true

+ 2 - 1
src/views/basicData/commodityCategory/index.vue

@@ -169,12 +169,13 @@ export default {
       customerList(values).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        console.log()
       })
     },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {
       const parentId = tree.id;
-      customerList({parentId:parentId}).then(res => {
+      customerList({parentId:parentId,size:10000}).then(res => {
         resolve(res.data.data.records);
       });
     },

+ 3 - 2
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -638,7 +638,6 @@ export default {
     },
     //修改提交触发
     editCustomer() {
-      console.log(this.form);
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.corpsAttnList = this.contactsData;
@@ -648,7 +647,9 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",");
           }
           this.disabled = true;
-          this.form.belongtoarea = this.form.belongtoarea.toString();
+          if(this.form.belongtoarea){
+            this.form.belongtoarea = this.form.belongtoarea.toString();
+          }
           typeSave(this.form).then(res => {
             if (res.data.data === "error") {
               this.disabled = false;

+ 17 - 1
src/views/basicData/customerInformation/index.vue

@@ -85,7 +85,8 @@
                    width="555px"
                    v-dialog-drag
         >
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+          <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading"
+                     :upload-before="uploadBefore" :upload-after="uploadAfter">
             <template slot="excelTemplate">
               <el-button type="primary" @click="derivation">
                 点击下载<i class="el-icon-download el-icon--right"></i>
@@ -153,6 +154,7 @@ export default {
         total: 0
       },
       excelBox: false,
+      excelLoading:false,
       excelForm: {},
       excelOption: {
         submitBtn: false,
@@ -187,14 +189,28 @@ export default {
   created() {
 
   },
+  // watch:{
+  //   'excelForm.isCovered'() {
+  //     if (this.excelForm.isCovered !== '') {
+  //       const column = this.findObject(this.excelOption.column, "excelFile");
+  //       column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+  //     }
+  //   }
+  // },
   methods: {
     derivation() {
       window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
+    uploadBefore(file,done,loading){
+      done();
+      loading = true
+    },
     uploadAfter(res, done, loading, column) {
       window.console.log(column);
       this.excelBox = false;
+      this.$message.success("导入成功!")
       this.refreshChange();
+      loading = false
       done();
     },
     nodeClick(data) {

+ 27 - 0
src/views/basicData/productInformation/index.vue

@@ -33,6 +33,14 @@
               @click="excelBox = true"
             >导入
             </el-button>
+            <el-button
+              type="warning"
+              size="small"
+              :disabled="selectionList.length==0"
+              icon="el-icon-delete"
+              @click="batchDelete"
+            >批量删除
+            </el-button>
           </template>
           <template slot-scope="scope" slot="menu">
 <!--            <el-button-->
@@ -243,6 +251,25 @@ export default {
         loading();
       });
     },
+    //批量删除
+    batchDelete(){
+      this.$confirm("确定批量删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(()=>{
+        let batchDeleteList =  this.selectionList.map(item =>{
+          return  item.id
+        })
+        remove(batchDeleteList.join(",")).then(res =>{
+          if(res.data.success){
+            this.$message.success("删除成功!")
+            this.refreshChange()
+          }
+        })
+      })
+
+    },
     //查看跳转页面
     beforeOpenPage(row, index) {
       this.$router.push({

+ 18 - 13
src/views/importTrade/receipt/config/customerContact.json

@@ -25,10 +25,9 @@
       "prop": "billNo",
       "index": 1,
       "width":150,
-      "cell": true,
       "rules": [
         {
-          "required": true,
+          "required": false,
           "message": " ",
           "trigger": "blur"
         }
@@ -38,10 +37,9 @@
       "prop": "contractNumber",
       "index": 1,
       "width":150,
-      "cell": true,
       "rules": [
         {
-          "required": true,
+          "required": false,
           "message": " ",
           "trigger": "blur"
         }
@@ -60,7 +58,7 @@
       ]
     },{
       "label": "货物详情",
-      "prop": "cname",
+      "prop": "itemDescription",
       "index": 3,
       "width":150,
       "cell": true,
@@ -71,10 +69,17 @@
           "trigger": "blur"
         }
       ]
-    },{
+    },
+    {
+      "label": "箱号",
+      "prop": "containerNo",
+      "index": 4,
+      "width":120
+    },
+   {
       "label": "发票净重(吨)",
       "prop": "invoiceWeight",
-      "index": 4,
+      "index": 6,
       "width":120,
       "cell": true,
       "rules": [
@@ -87,7 +92,7 @@
     },{
       "label": "码单重量(吨)",
       "prop": "billWeight",
-      "index": 5,
+      "index": 7,
       "width":120,
       "cell": true,
       "rules": [
@@ -100,7 +105,7 @@
     },{
       "label": "件数",
       "prop": "actualQuantity",
-      "index": 6,
+      "index": 8,
       "width":120,
       "rules": [
         {
@@ -112,7 +117,7 @@
     },{
       "label": "单价",
       "prop": "price",
-      "index": 7,
+      "index": 9,
       "width":120,
       "rules": [
         {
@@ -124,7 +129,7 @@
     },{
       "label": "合同金额",
       "prop": "contractAmount",
-      "index": 8,
+      "index": 9,
       "width":120,
       "rules": [
         {
@@ -136,7 +141,7 @@
     },{
       "label": "税率",
       "prop": "taxRate",
-      "index": 9,
+      "index": 10,
       "width":120,
       "cell": true,
       "rules": [
@@ -149,7 +154,7 @@
     },{
       "label": "备注",
       "prop": "remarks",
-      "index": 10,
+      "index": 11,
       "width":150,
       "cell": true,
       "rules": [

+ 211 - 50
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -6,6 +6,11 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
+      <el-button type="primary"
+                 class="el-button--small-yh add-customer-btn-three"
+                 :disabled="!form.id"
+                 @click.stop="confirmReceipt">确认收货
+      </el-button>
       <el-button type="success"
                  class="el-button--small-yh add-customer-btn-two"
                  :disabled="true"
@@ -28,7 +33,9 @@
               <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="date" placeholder="请选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
-                <selectComponent v-else-if="item.prop === 'salesCompany'" v-model="form[item.prop]" :configuration="sConfiguration"/>
+                <el-select v-else-if="item.prop === 'storageId'" style="width: 100%"   v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
+                  <el-option v-for="(item,index) in storageIdDic" :key="index" :label="item.cname" :value="item.id"></el-option>
+                </el-select>
                 <el-input type="textarea" v-else-if="(item.prop === 'deliveryRemarks')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input v-else v-model="form[item.prop]" size="small" :disabled="item.disabled?true:false" placeholder="请输入" autocomplete="off"></el-input>
               </el-form-item>
@@ -69,6 +76,61 @@
               ></el-input>
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
+            <template slot-scope="{row}" slot="billNo">
+              <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.billNo"
+                style="width: 90%"
+                placeholder=" "
+                size="small"
+                @change="bingOut(row)"
+              ></el-input>
+              <span v-else>{{ row.billNo }}</span>
+            </template>
+            <template slot-scope="{row}" slot="contractNumber">
+              <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
+              <el-select
+                v-if="row.$cellEdit"
+                style="width:90%"
+                v-model="row.contractNumber"
+                placeholder=" "
+                size="small"
+                clearable
+                filterable
+              >
+                <el-option
+                  style="width:90%"
+                  v-for="(item,index) in contractDic"
+                  :key="index"
+                  :label="item.orderNo"
+                  :value="item.orderNo"
+                ></el-option>
+              </el-select>
+              <span v-else>{{ row.contractNumber }}</span>
+            </template>
+            <template slot="invoiceWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                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.invoiceWeight)"
+              ></el-input>
+              <span v-else>{{ row.invoiceWeight }}</span>
+            </template>
+            <template slot="billWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                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.billWeight)"
+              ></el-input>
+              <span v-else>{{ row.billWeight }}</span>
+            </template>
             <template slot="priceCategory" slot-scope="{row,index}">
               <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
               <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
@@ -140,11 +202,26 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
-          <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
-                     :disabled="tableData.length !== 1">导入</el-button>
+<!--          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>-->
+<!--          <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"-->
+<!--                     :disabled="tableData.length !== 1">导入</el-button>-->
         </span>
     </el-dialog>
+    <el-dialog
+      title="导入采购"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="procurementDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false">
+      <procurement-detail
+        :status="132"
+        :closeFun="procurementClose"
+      >
+      </procurement-detail>
+    </el-dialog>
   </div>
 </template>
 
@@ -155,13 +232,19 @@ import {getSysNo} from "@/api/importTrade/purchase";
 import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
 import {detailReceiptList,
   submitReceiptList,
-  removeGoodsItem,} from "@/api/importTrade/receipt"
+  removeGoodsItem,
+  getStorage,
+  getInventory,
+  confirmReceipt
+} from "@/api/importTrade/receipt"
 import {
   getList
 } from "@/api/basicData/deliveryNotice"
 import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 import {detailListData } from "@/api/importTrade/purchase";
 import { contrastObj,contrastList } from "@/util/contrastData";
+import { getOrgOrderNo } from "@/api/importTrade/salesContract"
+import { procurementDetail } from "@/components/procurement/procurementDetail";
 
 export default {
   name: "detailsPageEdit",
@@ -170,6 +253,9 @@ export default {
       type: Object
     }
   },
+  components:{
+    procurementDetail
+  },
   data() {
     return {
       form: {},
@@ -177,6 +263,7 @@ export default {
       customerContact: customerContact,
       contactsForm: {},
       contactsData: [],
+      contractDic:[],
       selectKind:-1,
       configuration:{
         multipleChoices:false,
@@ -187,15 +274,6 @@ export default {
         placeholder:'请点击右边按钮选择',
         dicData:[]
       },
-      sConfiguration:{
-        multipleChoices:false,
-        multiple:false,
-        disabled:false,
-        searchShow:true,
-        collapseTags:false,
-        placeholder:'请点击右边按钮选择',
-        dicData:[]
-      },
       basicData: {
         column: [
           {
@@ -204,7 +282,7 @@ export default {
             disabled:true,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -214,7 +292,7 @@ export default {
             prop: 'orderNo',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -230,29 +308,31 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '销售公司',
-            prop: 'salesCompany',
+          },  {
+            label: '供应商',
+            prop: 'corpId',
             dicData: [],
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '工厂/贸易商名称',
-            prop: 'corpId',
+          },
+          {
+            label: '仓库名称',
+            type:'select',
+            prop: 'storageId',
             dicData: [],
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
-          }, {
+          },{
             label: '收货日期',
             prop: 'businessDate',
             type:'datetime',
@@ -263,10 +343,10 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },{
-            label: '仓库名称',
-            prop: 'storageId',
-            dicData: [],
+          },  {
+            label: '发票重量',
+            prop: 'invoiceWeight',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -274,9 +354,11 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },  {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+          },
+          {
+            label: '码单重量',
+            prop: 'billWeight',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -284,7 +366,8 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
+          },
+          {
             label: '备注',
             prop: 'deliveryRemarks',
             span: 24,
@@ -297,6 +380,7 @@ export default {
       //上传文件
       upLoadOption: upLoadOption,
       upLoadData:[],
+      storageIdDic:[],
       upLoadForm:{},
       dialogVisible: false,
       treeOption: {
@@ -334,6 +418,8 @@ export default {
       },
       commodityData: false,
       tableData: [],
+      //
+      procurementDialog:false,
       //新旧数据对比
       oldForm:{},
       oldContactsData:[],
@@ -341,13 +427,17 @@ export default {
     }
   },
   created() {
+    getStorage().then(res =>{
+      this.storageIdDic = res.data
+    })
     if (this.detailData.id) {
       let id = this.detailData.id.replace(/\"/g, "")
       detailReceiptList(id).then(res => {
         this.form = res.data.data;
         this.oldForm = Object.assign({},res.data.data);
-        this.configuration.dicData = this.form.companyName
-        this.sConfiguration.dicData = this.form.salesCompanyNameList
+        if(this.form.companyName){
+          this.configuration.dicData = this.form.companyName
+        }
         if(this.form.deliveryItemsList){
           this.contactsData = this.form.deliveryItemsList
           this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
@@ -357,17 +447,22 @@ export default {
           this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
         }
       })
-    }else{
-      getSysNo("JK-SH").then(res =>{
-        this.$set(this.form,"sysNo", res.data.data)
-      })
     }
+    // else{
+    //   getSysNo("JK-SH").then(res =>{
+    //     this.$set(this.form,"sysNo", res.data.data)
+    //   })
+    // }
     if(this.detailData.params){
       detailListData(this.detailData.params.id).then(res =>{
-        this.form.orderNo =  res.data.data.orderNo;
+        // this.form.orderNo =  res.data.data.orderNo;
+        // this.form.saleman =  res.data.data.salesName;
+        // this.configuration.dicData = res.data.data.corpsName
+        // this.form.corpId = res.data.data.corpsName[0].cname
         res.data.data.itemsVOList.forEach((item,index) =>{
           this.detailData.params.orderItemIds.forEach((e,i) =>{
             if(e ==  index){
+              item.srcId =  item.id;
               item.contractNumber =  res.data.data.orderNo;
               item.actualQuantity =  item.purchaseQuantity;
               item.contractAmount =  item.amount;
@@ -377,14 +472,35 @@ export default {
             }
           })
         })
-        res.data.data.orderNo = this.form.orderNo
-      })
-      getSysNo("JK-SH").then(res =>{
-        this.$set(this.form,"sysNo", res.data.data)
       })
     }
   },
   methods: {
+    //合计
+    totalChange(){
+      let invoiceList =  this.contactsData.map(item => {
+        if(!item.invoiceWeight){
+          item.invoiceWeight = 0
+        }
+        return parseFloat(item.invoiceWeight);
+      });
+      let billList =  this.contactsData.map(item => {
+        if(!item.billWeight){
+          item.billWeight = 0
+        }
+        return parseFloat(item.billWeight);
+      });
+      this.form.invoiceWeight = invoiceList.reduce((n,m) => n + m)
+      this.form.billWeight = billList.reduce((n,m) => n + m)
+    },
+    //提单号带出合同号
+    bingOut(row){
+      getOrgOrderNo(row.billNo).then(res =>{
+        if(res.data){
+          this.contractDic = res.data;
+        }
+      })
+    },
     //单价
     priceChange(row) {
       if (!row.price) {
@@ -463,10 +579,11 @@ export default {
           };
           submitReceiptList(submitDto).then(res => {
             if(res.data.success){
-              this.$message.success("操作成功!")
+              this.$message.success("保存成功!")
               detailReceiptList(res.data.data.id).then(res => {
                 this.form = res.data.data;
                 this.oldForm = Object.assign({},res.data.data);
+
                 this.configuration.dicData = this.form.companyName
                 this.sConfiguration.dicData = this.form.salesCompanyNameList
                 if(this.form.deliveryItemsList){
@@ -488,6 +605,30 @@ export default {
         }
       });
     },
+    //确认收货
+    confirmReceipt(){
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        || contrastList(this.upLoadData,this.oldUpLoadData)
+      ){
+        this.$confirm("请先保存在进行收货?", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(()=>{
+          this.editCustomer()
+        })
+      }else{
+        this.$confirm("是否确认全部收货?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(()=>{
+          this.form.deliveryItemsList = this.contactsData;
+          confirmReceipt(this.form).then(res =>{
+          })
+        })
+      }
+    },
     //上传文件保存
     upLoadSave(row, done, loading){
       this.upLoadData.push(row)
@@ -531,10 +672,19 @@ export default {
     //选择货品
     commodityConfirm(){
       if(this.tableData){
-        this.importInventoryData[this.selectKind].priceCategory = this.tableData[0].id;
-        this.$set(this.importInventoryData[this.selectKind],'priceCategoryNames',this.tableData[0].cname)
+        this.contactsData[this.selectKind].priceCategory = this.tableData[0].id;
+        this.contactsData[this.selectKind].itemDescription = this.tableData[0].cnameDescription;
+        this.$set(this.contactsData[this.selectKind],'priceCategoryNames',this.tableData[0].cname)
+        // let  params = {
+        //   corpId : this.form.corpId,
+        //   storageId: this.form.storageId,
+        //   goodId:  this.contactsData[this.selectKind].priceCategory,
+        //   cntrNo: this.contactsData[this.selectKind].containerNo ,
+        //   billNo: this.contactsData[this.selectKind].billNo ,
+        //   contractNumber:  this.contactsData[this.selectKind].contractNumber,
+        // }
         this.dialogVisible = !this.dialogVisible
-        this.selectKind = -1
+        this.selectKind = -1;
       }
     },
     //点击商品明细选择触发
@@ -545,8 +695,10 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      this.dialogVisible = !this.dialogVisible
-      this.commodityData = false
+      this.procurementDialog = true;
+      // this.$refs.crudContact.rowCellAdd();
+      // this.dialogVisible = !this.dialogVisible
+      // this.commodityData = false
     },
     //导入页左商品类型查询
     nodeClick(data) {
@@ -670,6 +822,12 @@ export default {
   top: 115px;
 }
 
+.add-customer-btn-three {
+  position: fixed;
+  right: 266px;
+  top: 115px;
+}
+
 .el-dialogDeep {
   ::v-deep .el-dialog {
     margin: 1vh auto 0 !important;
@@ -681,4 +839,7 @@ export default {
     }
   }
 }
+::v-deep .el-form-item__content{
+  line-height: 32px;
+}
 </style>

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

@@ -48,7 +48,7 @@
       ]
     },{
       "label": "货物详情",
-      "prop": "cname",
+      "prop": "itemDescription",
       "index": 3,
       "width":180,
       "cell": true,
@@ -72,12 +72,25 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "已发数量",
+      "prop": "actualQuantity",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
     },{
       "label": "发票净重(吨)",
       "prop": "invoiceWeight",
       "index": 5,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,
@@ -89,8 +102,7 @@
       "label": "码单重量(吨)",
       "prop": "billWeight",
       "index": 6,
-      "width":120,
-      "cell": true
+      "width":120
     },{
       "label": "件数",
       "prop": "purchaseQuantity",

+ 81 - 8
src/views/purchase/contract/detailsPage.vue

@@ -41,8 +41,8 @@
                 <el-select v-else-if="item.prop === 'orderType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in contractTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
-                <el-select v-else-if="item.prop === 'currency'" style="width: 100%"   v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
-                  <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
+                <el-select v-else-if="item.prop === 'currency'" style="width: 100%"    v-model="form[item.prop]" size="small" placeholder="请选择" @change="currencyChange" clearable filterable>
+                  <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
                 </el-select>
                 <el-select v-else-if="item.prop === 'paymentType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in paymentTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
@@ -89,6 +89,32 @@
               ></el-input>
               <span v-else>{{ row.purchaseQuantity }}</span>
             </template>
+            <template slot="invoiceWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                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.invoiceWeight)"
+              ></el-input>
+              <span v-else>{{ row.invoiceWeight }}</span>
+            </template>
+            <template slot="billWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                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.billWeight)"
+              ></el-input>
+              <span v-else>{{ row.billWeight }}</span>
+            </template>
+            <template slot="priceCategory" slot-scope="{row,index}">
+              <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
+              <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                 type="text"
@@ -122,10 +148,11 @@
                          @click="applicationDialog = true,applicationData = contactsData"
               >查看申请记录
               </el-button>
-            </template>
-            <template slot="priceCategory" slot-scope="{row,index}">
-              <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
-              <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
+              <el-button type="info"
+                         size="small"
+                         @click=""
+              >审批流
+              </el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -511,6 +538,7 @@ export default {
           }, {
             label: '汇率',
             prop: 'exchangeRate',
+            disabled: true,
           }, {
             label: '人民币金额',
             prop: 'rmbAmount',
@@ -566,7 +594,18 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },   {
+          },  {
+            label: '发票重量',
+            prop: 'invoiceWeight',
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },  {
             label: '码单重量',
             prop: 'billWeight',
             disabled: true,
@@ -642,6 +681,34 @@ export default {
         row.amount = (row.purchaseQuantity * row.price).toFixed(2);
       }
     },
+    currencyChange(value){
+      if(this.form.orderAmount){
+        if(value === "人民币"){
+          this.form.exchangeRate = 1
+          this.form.rmbAmount = this.form.orderAmount
+        }else{
+          this.form.exchangeRate = 6.3843
+          this.form.rmbAmount = this.form.orderAmount * 6.3843
+        }
+      }
+    },
+    //合计
+    totalChange(){
+      let invoiceList =  this.contactsData.map(item => {
+        if(!item.invoiceWeight){
+          item.invoiceWeight = 0
+        }
+        return parseFloat(item.invoiceWeight);
+      });
+      let billList =  this.contactsData.map(item => {
+        if(!item.billWeight){
+          item.billWeight = 0
+        }
+        return parseFloat(item.billWeight);
+      });
+      this.form.invoiceWeight = invoiceList.reduce((n,m) => n + m)
+      this.form.billWeight = billList.reduce((n,m) => n + m)
+    },
     //件数
     quantityChange(row) {
       if (!row.purchaseQuantity) {
@@ -843,7 +910,13 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      this.$refs.crudContact.rowCellAdd();
+      const params ={
+        billWeight:0,
+        invoiceWeight:0,
+        price:0,
+        purchaseQuantity:0,
+      }
+      this.$refs.crudContact.rowCellAdd(params);
       // this.dialogVisible = !this.dialogVisible
       // this.commodityData = false
     },

+ 1 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -249,7 +249,7 @@
           multipleChoices:false,
           multiple:false,
           disabled:false,
-          searchShow:false,
+          searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
           dicData:[]

+ 1 - 0
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -338,6 +338,7 @@
         if(this.id){
           projectDetail(this.id,"4,5").then(res =>{
             this.form = res.data.data;
+            this.configuration.dicData   = res.data.data.corpName
             if(res.data.data.itemList){
               this.loading = true;
               this.dataList = res.data.data.itemList;

+ 5 - 0
src/views/workManagement/task/configuration/mainList.json

@@ -35,6 +35,11 @@
       "width": 120
     },
     {
+      "label": "客户名称",
+      "prop": "cornName",
+      "width": 220
+    },
+    {
       "label": "服务项目",
       "prop": "pname",
       "search": true,