zhongtianhaoyuan 3 年之前
父节点
当前提交
1a58920762

+ 2 - 5
src/api/V2/houseSelfCollect/index.js

@@ -64,8 +64,6 @@ export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
 //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
-//质检运输方式
-export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
 //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
 //识别银行卡
@@ -101,9 +99,8 @@ export const API_GAT_GETQRCODE = '/weighingManagement/getQRcode'
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
 // 审核之后接口
 export const API_POST_WORKFLOW_TASK = `/newWorkflow/getTaskWebsocket`
-// 结算单
-export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
-
 // 反结算
 // export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
 export const API_POST_SUSPENDINSTANCE ='/paymentManagement/api/ReSettlement'
+//导入
+export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'

+ 2 - 2
src/lang/zh.js

@@ -1032,7 +1032,7 @@ export default {
     dynamicReportsDetail: '动态报详情',
 
     // 库内自采
-    houseSelfCollect: '入库管理',
+    houseSelfCollect: '收购业务管理',
     deliverywarehouse:'出库管理',
     customerManagement: '客户管理',
     acquisitionManagement: '仓库设置',
@@ -7478,7 +7478,7 @@ export default {
     weighingManagement: '检斤管理',
     weighingManagement: '检斤管理',
     newWeighingManagement: '检斤管理',
-    houseSelfCollect: '入库管理',
+    houseSelfCollect: '收购业务管理',
     deliverywarehouse:'出库管理',
     houseSelfCollectPrint: '查看',
     customerManagementEdit: '客户管理编辑',

+ 4 - 8
src/model/houseSelfCollect/index.js

@@ -51,10 +51,9 @@ import {
   API_GAT_GETQRCODE,
   API_GAT_INFO,
   API_POST_WORKFLOW_TASK,
-  API_GET_INSPECT_CONTRACTNO,
-  API_GET_SETTLEACCOUT,
   API_POST_INSPECT_GETWEIGHTDELETE,
-  API_POST_SUSPENDINSTANCE
+  API_POST_SUSPENDINSTANCE,
+  API_POST_IMPORT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -122,8 +121,6 @@ export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorH
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
 //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
-//质检运输方式
-export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
 //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
 //银行卡识别
@@ -160,8 +157,7 @@ export const getQRCodeData  = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHa
 export const getcartype  = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
 // 审核之后
 export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, errorHandle, filter)
-
-// 查看结算单
-export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
 // 反结算
 export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)
+// 导入
+export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)

+ 2 - 2
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -77,8 +77,8 @@
         <div class="content" v-for="(item,index) in priceList" :key="index">
           <div class="top">
             <div  class="left">
-              <div v-if="baseInfoForm.paramType == '2' " class="text">基准单价(元/公斤)</div>
-              <el-input v-if="baseInfoForm.paramType == '2' " type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
+              <div v-if="baseInfoForm.paramType == '2' "class="text">基准单价(元/公斤)</div>
+              <el-input v-if="baseInfoForm.paramType == '2' "type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
             </div>
             <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
           </div>

+ 7 - 8
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -52,6 +52,7 @@
         <td class="col col-bgc">皮重</td>
         <td class="col col-bgc">扣杂重</td>
         <td class="col col-bgc">净重</td>
+        <!-- <td class="col col-bgc">纯重</td> -->
       </tr>
       <tr class="row">
         <td class="col">{{ printData.goodsName}}</td>
@@ -66,7 +67,6 @@
         <td class="col">{{ printData.netWeight}}</td>
       </tr>
       <tr class="row">
-         <td class="col col-bgc">出库净重</td>
         <td class="col col-bgc">纯重</td>
         <td class="col col-bgc"  v-if="printData.type == '潮粮'">净重单价</td>
         <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
@@ -77,10 +77,10 @@
         <td class="col col-bgc">卸车补助</td>
         <td class="col col-bgc">其他补助</td>
         <td class="col col-bgc">称重扣款</td>
-        <!-- <td class="col col-bgc">运费扣款</td> -->
+        <td class="col col-bgc">运费扣款</td>
+        <!-- <td class="col col-bgc">卸车扣款</td> -->
       </tr>
       <tr class="row">
-        <td class="col">{{ printData.contractManagement ? printData.contractManagement.weight : "0"}}</td>
         <td class="col">{{ printData.pureWeight}}</td>
         <td class="col " v-if="printData.type == '潮粮'">{{printData.tidalGrainPrice}}</td>
         <td class="col " v-if="printData.type == '干粮'">{{printData.qualityInspectionManagement.dryGrainPrice}}</td>
@@ -91,10 +91,10 @@
         <td class="col ">{{ printData.unloadSubsidy}}</td>
         <td class="col ">{{ printData.otherSubsidy}}</td>
         <td class="col ">{{ printData.weighingDeduction}}</td>
-        <!-- <td class="col ">{{ printData.freightDeduction}}</td> -->
+        <td class="col ">{{ printData.freightDeduction}}</td>
+        <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
       </tr>
       <tr class="row">
-        <td class="col col-bgc">运费扣款</td>
         <td class="col col-bgc">卸车扣款</td>
         <td class="col col-bgc">质量扣款</td>
         <td class="col col-bgc">其他扣款</td>
@@ -102,10 +102,9 @@
         <td class="col col-bgc">合计应付</td>
         <td class="col col-bgc">购粮性质</td>
         <td class="col col-bgc">车牌号</td>
-        <td class="col col-bgc" colspan="3">记事</td>
+        <td class="col col-bgc" colspan="4">记事</td>
       </tr>
       <tr class="row">
-        <td class="col ">{{ printData.freightDeduction}}</td>
         <td class="col ">{{ printData.unloadDeduction}}</td>
         <td class="col ">{{ printData.qualityDeduction}}</td>
         <td class="col ">{{ printData.otherDeduction}}</td>
@@ -113,7 +112,7 @@
         <td class="col ">{{ printData.calculationPayable}}</td>
         <td class="col ">{{ printData.qualityInspectionManagement.natureOfGrainPurchase}}</td>
         <td class="col ">{{ printData.carNo}}</td>
-        <td class="col " colspan="3">{{ printData.remarks}}</td>
+        <td class="col " colspan="4">{{ printData.remarks}}</td>
       </tr>
       <tr class="row">
         <td class="col col-bgc">实付金额</td>

+ 10 - 82
src/views/houseSelfCollect/component/routers/route.js

@@ -70,70 +70,28 @@ const houseSelfCollectRouter = {
       },
         hidden: true
     },
-    // // 质检管理
-    // {
-    //   path: 'inspectionManagement',
-    //   component: () =>
-    //     import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagement'),
-    //   name: 'inspectionManagement',
-    //   meta: {
-    //     title: 'inspectionManagement',
-    //     shortcutEntrance: 'houseSelfCollect',
-    //     module: 'acquisitionManagement.acquisitionQuality.view',
-    //     permissicon: [],
-    //     keepAlive: true
-    //   }
-    // },
-    // // 质检管理记录
-    {
-      path: 'inspectionManagementrecord',
-      component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagementrecord'),
-      name: 'inspectionManagementrecord',
-      meta: {
-        title: 'inspectionManagementrecord',
-        shortcutEntrance: 'houseSelfCollect',
-        module: 'acquisitionManagement.acquisitionQuality.view',
-        permissicon: [],
-        // keepAlive:true
-      },
-      hidden: true
-    },
+    // 质检管理
     {
       path: 'inspectionManagement',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagementNew'),
-      name: 'inspectionManagementNew',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagement'),
+      name: 'inspectionManagement',
       meta: {
         title: 'inspectionManagement',
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionQuality.view',
         permissicon: [],
-        keepAlive:true
+        keepAlive: true
       }
     },
-    // // 检斤管理
-    // {
-    //   path: 'weighingManagement',
-    //   component: () =>
-    //     import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
-    //   name: 'weighingManagement',
-    //   meta: {
-    //     title: 'weighingManagement',
-    //     shortcutEntrance: 'houseSelfCollect',
-    //     module: 'acquisitionManagement.acquisitionWeight.view',
-    //     permissicon: [],
-    //     keepAlive: true
-    //   }
-    // },
-     // 新检斤管理
-     {
-      path: 'newWeighingManagement',
+    // 检斤管理
+    {
+      path: 'weighingManagement',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/newWeighingManagement'),
-      name: 'newWeighingManagement',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
+      name: 'weighingManagement',
       meta: {
-        title: 'newWeighingManagement',
+        title: 'weighingManagement',
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionWeight.view',
         permissicon: [],
@@ -168,20 +126,6 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
-    {
-      path: 'inspectInfolook',
-      component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectInfoLook'),
-      name: 'inspectInfo',
-      meta: {
-        title: 'inspectInfo',
-        shortcutEntrance: 'inspectInfo',
-        module: 'acquisitionManagement.acquisitionQuality.view',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
     {
       path: 'inspectInfo',
       component: () =>
@@ -210,22 +154,6 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
-   
-    // 记录
-    {
-      path: 'weightCheckRecord',
-      component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weightCheckRecord'),
-      name: 'weightCheckRecord',
-      meta: {
-        title: 'weightCheckRecord',
-        shortcutEntrance: 'houseSelfCollect',
-        module: 'acquisitionManagement.acquisitionWeight.view',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
   ],
 
 };

+ 5 - 8
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -4,14 +4,10 @@
         <div class="number">{{tableData.number}}</div>
         <table class="table">
           <tr class="row">
-            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
-            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
-            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
-            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
-            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
-            <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
-            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
-            <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
+            <td class="col col-bgc">客户姓名</td>
+            <td class="col" colspan="2">{{tableData.customer}}</td>
+            <td class="col col-bgc">客户电话</td>
+            <td class="col" >{{tableData.customerPhone}}</td>
             <td class="col col-bgc">车牌号</td>
             <td class="col" colspan="2">{{tableData.carNumber}}</td>
           </tr>
@@ -125,6 +121,7 @@ export default{
     text-align: right;
     margin: 0 0 10px 0;
   }
+
   table,
   table tr th,
   table tr td {

+ 2 - 1
src/views/houseSelfCollect/inspectInfo.vue

@@ -156,7 +156,8 @@
           <div class="but">
             <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
                <el-button @click="checkOk" v-if="types == 4" type="primary">确认初检信息</el-button>
-            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存</el-button>
+            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存
+            </el-button>
             <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
             <el-button @click="cancel" v-if="types == 2" type="primary">关闭</el-button>
           </div>

+ 1 - 1
src/views/houseSelfCollect/inspectionManagement.vue

@@ -101,7 +101,7 @@
           <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm !='1'"
             v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
           <div style="display: inline-block;"
-            v-if="scope.row.weighingManagement&&scope.row.weighingManagement.status=='已质检'">
+            v-if="!scope.row.weighingManagement">
             <el-button @click="del(scope.row)" type="danger"
               v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
           </div>

+ 162 - 40
src/views/houseSelfCollect/paymentManagement.vue

@@ -78,6 +78,15 @@
         <ws-button type="primary" @click="agreementPrint()"
           v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">下载结算单
         </ws-button>
+        <!-- <el-upload :on-change="importClick" action="" :show-file-list="false" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" :auto-upload="false"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.dow`"><el-button type="primary">导入</el-button>
+        </el-upload> -->
+        <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
+          :on-change="importClick" :show-file-list="false"
+          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+          :auto-upload="false">
+          <el-button type="primary">导入</el-button>
+        </el-upload>
       </template>
       <template slot="right"> </template>
     </BaseHeaderLayout>
@@ -145,7 +154,8 @@
           </span>
           <el-button @click="settlement(2, scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
           </el-button>
-          <el-button  v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.seet`">反结算
+          <el-button v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)"
+            v-hasPermission="`acquisitionManagement.acquisitionPay.seet`">反结算
           </el-button>
           <el-button v-if="
               scope.row.approveStatus ||
@@ -311,16 +321,16 @@
       </el-image>
     </el-dialog>
     <el-dialog width="30%" title="开票信息" :visible.sync="invoicingshow" :close="invoicingClose">
-       <el-form :label-position="labelposition" label-width="200px" style='text-align:center;' class="customer">
+      <el-form :label-position="labelposition" label-width="200px" style='text-align:center;' class="customer">
         <el-form-item label="税控盘:">
-          <el-select v-model="invoiceFlag" placeholder="请选择税控盘"
-          filterable clearable style="margin: 0 10px">
-          <el-option v-for="item in invoicingList" :key="'invoicing'+item.value" :label="item.label" :value="item.value">
-          </el-option>
-        </el-select>
+          <el-select v-model="invoiceFlag" placeholder="请选择税控盘" filterable clearable style="margin: 0 10px">
+            <el-option v-for="item in invoicingList" :key="'invoicing'+item.value" :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
         </el-form-item>
       </el-form>
-        <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer">
         <el-button @click="invoicingshow = false">取 消</el-button>
         <el-button type="primary" @click="invoicingconfirm">确 定</el-button>
       </span>
@@ -350,7 +360,8 @@
     export1,
     settlementEdit,
     workflowcontent,
-    suspendinstance
+    suspendinstance,
+    importWord
   } from '@/model/houseSelfCollect/index'
   import {
     posthandle,
@@ -371,15 +382,21 @@
         paymentReceipt: '',
         isPreviewPayOrder: false,
         printType: 0,
-        invoiceFlag:'',
+        invoiceFlag: '',
         isShowPrintType1: true,
         isShowPrintType2: true,
         isShowPrintType3: true,
         isShowPrintType4: true,
         customerInfo: false,
         form: {},
-        labelposition:'right',
-        invoicingList:[{label:'航天信息',value:1},{label:'百旺',value:2}],
+        labelposition: 'right',
+        invoicingList: [{
+          label: '航天信息',
+          value: 1
+        }, {
+          label: '百旺',
+          value: 2
+        }],
         formLabelWidth: '300px',
         invoicing: '',
         deleteshow: false,
@@ -422,7 +439,7 @@
         warehouseNameKey: '',
         warehouseName: '',
         isShowPrint: false,
-        invoicingshow:false,
+        invoicingshow: false,
         printData: {},
         warehouse: [],
         disabled: false,
@@ -446,6 +463,10 @@
           year: dayjs().format('YYYY'),
           month: dayjs().format('MM'),
         },
+        accessoryTFs: false,
+        fileList: [],
+        appendixIdsAdd: '',
+        excelFreightspace: [],
       }
     },
     activated() {
@@ -455,37 +476,144 @@
       // this.getList()
     },
     updated() {
+
       this.$nextTick(() => {
         this.$refs['table'].doLayout()
       })
     },
     methods: {
-      invoicingClose(){
-        this.invoicingshow=false
+      importClick(file, fileList) {
+        this.fileTemp = file.raw
+        let fileName = file.raw.name
+        let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
+        // 判断上传文件格式
+        if (this.fileTemp) {
+          if (fileType == 'xlsx' || fileType == 'xls') {
+            this.importf(this.fileTemp)
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '附件格式错误,请删除后重新上传!',
+            })
+          }
+        } else {
+          this.$message({
+            type: 'warning',
+            message: '请上传附件!',
+          })
+        }
       },
-      settleaccounts(row){
+      importf(obj) {
+        this.excelFreightspace = []
+        // this.dialogVisible = true;
+        let _this = this;
+        let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
+        this.file = event.currentTarget.files[0];
+        var rABS = false; //是否将文件读取为二进制字符串
+        var f = this.file;
+        var reader = new FileReader();
+        //if (!FileReader.prototype.readAsBinaryString) {
+        FileReader.prototype.readAsBinaryString = function(f) {
+          var binary = "";
+          var rABS = false; //是否将文件读取为二进制字符串
+          var pt = this;
+          var wb; //读取完成的数据
+          var outdata;
+          var reader = new FileReader();
+          reader.onload = function(e) {
+            var bytes = new Uint8Array(reader.result);
+            var length = bytes.byteLength;
+            for (var i = 0; i < length; i++) {
+              binary += String.fromCharCode(bytes[i]);
+            }
+            var XLSX = require('xlsx');
+            if (rABS) {
+              wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
+                type: 'base64',
+                cellDates: true
+              });
+            } else {
+              wb = XLSX.read(binary, {
+                type: 'binary'
+              });
+            }
+            // outdata就是你想要的东西 excel导入的数据
+            outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
+            // excel 数据再处理
+            let arr = []
+            outdata.map(v => {
+              // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
+              let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
+              v = JSON.parse(jsonString);
+              let obj = {}
+              //xxx代表列名
+              obj.qualityNo = v.业务编号
+              obj.customerName = v.客户姓名
+              obj.customerNumberCard = v.身份证号
+              obj.customerPhone = v.客户手机号
+              obj.carNumber = v.车牌号
+              obj.grossWeight = v.毛重
+              obj.tare = v.皮重
+              obj.netWeight = v.净重
+              obj.dryGrainPrice = v.单价
+              obj.qualityDate = v.日期
+              _this.excelFreightspace.push(obj)
+            })
+            if (_this.excelFreightspace) {
+              importWord({
+                  warehouseName: _this.warehouseName,
+                  qualityInspectionManagementList: _this.excelFreightspace
+                }).toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.$notify({
+                      title: '成功',
+                      message: '导入成功',
+                      type: 'success'
+                    });
+                    _this.getList()
+                  }
+                })
+
+            }
+          }
+          reader.readAsArrayBuffer(f);
+        }
+        if (rABS) {
+          reader.readAsArrayBuffer(f);
+        } else {
+          reader.readAsBinaryString(f);
+        }
+
+      },
+      invoicingClose() {
+        this.invoicingshow = false
+      },
+      settleaccounts(row) {
         this.$confirm('确定将该笔业务进行反结算操作?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
 
-          suspendinstance({workflowId:row.workflowId,id:row.id}).toPromise()
-          .then((response) => {
-          this.$message({
-            type: 'success',
-            message: '反结算成功!'
-          }); 
-          this.getList()
-          })
+          suspendinstance({
+              workflowId: row.workflowId,
+              id: row.id
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                type: 'success',
+                message: '反结算成功!'
+              });
+              this.getList()
+            })
         }).catch(() => {
-          return false       
+          return false
         });
-       
+
       },
       imgshow() {
         this.deleteshow = false
-        console.log(11111)
       },
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
@@ -494,8 +622,6 @@
       previewPayOrder(val) {
         this.paymentReceipt = val.paymentScreenshot
         this.isPreviewPayOrder = true
-        console.log(val.paymentScreenshot)
-
       },
       paymentReceiptClose() {},
       datechange() {
@@ -535,7 +661,6 @@
         this.value2 = [formatDate, nowData] // 默认赋值一年时间
       },
       selectPrint() {
-        console.log('批量打印数据', this.modification)
         this.printType = 1
         this.isShowPrintType = true
       },
@@ -555,7 +680,6 @@
         }
       },
       async exportlist() {
-        console.log('导出数据', this.modification)
         let _data = {
           paymentManagementList: this.modification,
         }
@@ -627,12 +751,12 @@
           xmlhttp.send()
         })
       },
-      invoicingconfirm(){
+      invoicingconfirm() {
         let data = {
           paymentManagementList: this.modification,
         }
         for (let i = 0; i < this.modification.length; i++) {
-          this.modification[i].invoiceFlag=this.invoiceFlag
+          this.modification[i].invoiceFlag = this.invoiceFlag
           if (
             this.modification[i].status != '全部付款' &&
             this.modification[i].status != '部分付款' &&
@@ -660,7 +784,7 @@
           .catch(() => {})
       },
       invoicingClick() {
-        this.invoicingshow=true
+        this.invoicingshow = true
         // let data = JSON.stringify({
         //   paymentManagementList : this.modification
         // })
@@ -695,7 +819,6 @@
       },
       //合计
       getSummaries(param) {
-        console.log(param)
         const {
           columns,
           data
@@ -709,7 +832,6 @@
         }
         if (this.modification.length > 0) {
           columns.forEach((column, index) => {
-            console.log(column, index)
             if (index === 0) {
               sums[index] = '合计'
             } else if (index === 10 || index === 11 || index === 15 || index === 16) {
@@ -775,7 +897,7 @@
             case '打印检斤单':
               this.isShowPrintType4 = !this.isShowPrintType4
               break
-              case '打印回执单':
+            case '打印回执单':
               this.isShowPrintType5 = !this.isShowPrintType5
               break
           }
@@ -784,7 +906,7 @@
       typePrintCannelClick() {
         this.isShowPrintType = false
       },
-     async typePrintClick(type) {
+      async typePrintClick(type) {
         // type 1批量打印 0单个打印
         //  this.isShowPrint = true
         this.selectCustomerList = []
@@ -793,7 +915,7 @@
           let index1 = 0
           let index2 = 0
           for (let i = 0; i < this.modification.length; i++) {
-          await getCustomerLook({
+            await getCustomerLook({
                 id: this.modification[i].identityId,
                 authenticationStatusKey: 7,
               })
@@ -809,7 +931,7 @@
                   // this.isShowPrint = true
                   this.printBig()
                 }
-               getpaymentexamine({
+                getpaymentexamine({
                     id: this.modification[i].id,
                   })
                   .toPromise()

+ 17 - 33
src/views/houseSelfCollect/settlement.vue

@@ -56,10 +56,6 @@
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.unitDeduction" @input="grainMoney"
                 placeholder="请输入扣单价" maxlength="100" size="small" :disabled="disabled" />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.contractManagement && paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1' label="出库净重(公斤)" span="1" prop="weight">
-              <ws-input type="number" v-model="paymentList.contractManagement.weight" @input="grainMoney"
-                placeholder="自动获取,不可编辑" maxlength="100" size="small" disabled/>
-            </ws-form-item>
           </ws-info-table>
           <div class="titles">质检数据</div>
           <ws-info-table>
@@ -177,18 +173,12 @@
 
           <div class="titles">结算金额(元)</div>
           <ws-info-table>
-            <ws-form-item v-if='paymentList.type=="潮粮" && !paymentList.contractManagement' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
-              class="formItem">
-              <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
-                placeholder="请输入粮款" maxlength="100" size="small" disabled />
-            </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="干粮" && !paymentList.contractManagement' label="粮款 = 净重 x  (干粮单价 - 扣单价)  =" span="1" prop="waterContent"
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
               class="formItem">
               <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
                 placeholder="请输入粮款" maxlength="100" size="small" disabled />
             </ws-form-item>
-            <!-- 采购合同 自运 按合同的出库净重计算 -->
-            <ws-form-item v-if='paymentList.contractManagement' label="粮款 = 出库净重 x  (单价 - 扣单价)  =" span="1" prop="waterContent"
+            <ws-form-item v-if='paymentList.type=="干粮"' label="粮款 = 净重 x  (干粮单价 - 扣单价)  =" span="1" prop="waterContent"
               class="formItem">
               <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
                 placeholder="请输入粮款" maxlength="100" size="small" disabled />
@@ -429,30 +419,25 @@
         this.paymentList.capitalize = this.convertCurrency(e)
       },
       grainMoney() {
-        if(this.paymentList.contractManagement && this.paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1){//合同收购自运按出库重量结算 (条件:按出库结算&& 采购合同&&自运)
-          if(this.paymentList.type == '潮粮'){
-            this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
-          }else{
-            this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
-          }
-          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
-          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
-            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
-          this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
-          this.paymentList.actualPayment = this.paymentList.calculationPayable
-          this.actualPayment(this.paymentList.actualPayment)
-        }else if (this.paymentList.type == '潮粮') {
-          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
-          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
-          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
-            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
+        if (this.paymentList.type == '潮粮') {
+          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList
+            .unitDeduction) * this.paymentList.weighingManagement.netWeight
+          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight))
+            .toFixed(4)
+          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
+              .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
+            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
+            .freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
+            Number(this.paymentList.qualityDeduction)
           this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
 
           this.paymentList.actualPayment = this.paymentList.calculationPayable
           this.actualPayment(this.paymentList.actualPayment)
-        } else if(this.paymentList.type == '干粮') {
-          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
-          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList.weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
+        } else {
+          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList
+            .unitDeduction) * this.paymentList.weighingManagement.netWeight
+          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
+              .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
             Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
             .freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
             Number(this.paymentList.qualityDeduction)
@@ -660,7 +645,6 @@
         this.paymentList.id = this.$route.query.id
         this.paymentList.amountIngPayable = this.paymentList.actualPayment
         this.paymentList.settlementClerk = localStorage.getItem('ws-pf_staffName')
-        delete this.paymentList.contractManagement
         postpaymentedit(this.paymentList).toPromise().then((response) => {
           getpaymentexamine({
             id: this.$route.query.id

+ 9 - 7
src/views/houseSelfCollect/weighingManagement.vue

@@ -98,7 +98,7 @@
         </template>
       </el-table-column>
       <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="270" prop="contractNo1" label="操作">
+      <el-table-column width="340" prop="contractNo1" label="操作">
         <template slot-scope="scope">
           <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' "
             v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`">毛重</el-button>
@@ -431,17 +431,19 @@
         this.getList()
       },
       isConfirmQuality(val) {
-        if (val.qualityInspectionManagement.confirm == '1' && val.qualityInspectionManagement.warehouseName == '哈尔滨依兰库')
-          return false;
-        return true
+        if (val.qualityInspectionManagement.confirm == '0' && val.qualityInspectionManagement.warehouseName == '白城内陆港') return false;
+        return true;
       },
       weightCheck(row, num) {
         console.log(this.cangid)
         // 质检是否是已确定状态
-        // let _isGoweightCheck = this.isConfirmQuality(row)
-        let _isGoweightCheck = true
+        let _isGoweightCheck = this.isConfirmQuality(row)
+        // let _isGoweightCheck = true
+        if(num == 1){
+          _isGoweightCheck = true
+        }
         console.log(row.qualityInspectionManagement)
-        if (_isGoweightCheck) {
+        if (_isGoweightCheck ) {
           this.$router.push({
             path: 'weightCheck',
             query: {