Browse Source

修改bug

qukaidi 2 năm trước cách đây
mục cha
commit
275cc7ae09

+ 7 - 0
src/api/basicData/agreement.js

@@ -80,4 +80,11 @@ export const itemsubmit = (row) => {
     method: 'post',
     data: row
   })
+}
+export const itemDel= (row) => {
+  return request({
+    url: '/api/trade-purchase/agreementitems/removeById',
+    method: 'post',
+    params: row
+  })
 }

+ 7 - 0
src/api/basicData/financing.js

@@ -46,4 +46,11 @@ export const checkFinancing= (row) => {
     method: 'post',
     data: row
   })
+}
+export function revokeWarehousing(data) {
+  return request({
+      url: '/api/trade-purchase/woodHarvestingCloud/revokeWarehousing',
+      method: 'post',
+      data: data
+  })
 }

+ 8 - 1
src/api/purchasingManagement/inStock.js

@@ -82,8 +82,15 @@ export function financingExcess(data) {
 }
 export function delItem(data) {
     return request({
-        url: '/api/trade-purchase/woodHarvestingCloud/removeByItemId ',
+        url: '/api/trade-purchase/woodHarvestingCloud/removeByItemId',
         method: 'post',
         params: data
     })
+}
+export function revokeWarehousing(data) {
+    return request({
+        url: '/api/trade-purchase/woodHarvestingCloud/revokeWarehousing',
+        method: 'post',
+        data: data
+    })
 }

+ 3 - 0
src/page/index/tags.vue

@@ -345,6 +345,9 @@ export default {
         if (tag.label == "销售机会") {
           this.$store.commit('XSJH_OUT_DETAIL');
         }
+        if(tag.label == "出库管理"){
+          this.$store.commit("OUT_CKGL_STATUS");
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 1 - 0
src/store/getters.js

@@ -52,5 +52,6 @@ const getters = {
   handOverStatus: state => state.ifdetail.handOverStatus,
   reimbursementStatus: state => state.ifdetail.reimbursementStatus,
   dealerSaleStatus: state => state.ifdetail.dealerSaleStatus,
+  ckglStatus:state => state.ifdetail.ckglStatus
 }
 export default getters

+ 10 - 0
src/store/modules/ifdetail.js

@@ -26,6 +26,7 @@ const ifdetail = {
     reimbursementStatus: false, // 报销
     dealerSaleStatus: false, //经销商销售
     xsjhStatus: false,
+    ckglStatus: false, //出口报价
   },
   actions: {},
   mutations: {
@@ -84,10 +85,16 @@ const ifdetail = {
     IN_BJ_STATUS(state) {
       state.bjStatus = true;
     },
+    IN_CKGL_STATUS(state) {
+      state.ckglStatus = true;
+    },
     //退出详情页
     OUT_BJ_STATUS(state) {
       state.bjStatus = false;
     },
+    OUT_CKGL_STATUS(state) {
+      state.ckglStatus = false;
+    },
     //出口状态
     // 进入详情页
     REC_IN_DETAIL(state) {
@@ -264,6 +271,9 @@ const ifdetail = {
       if (tag.label == '报价(E)') {
         state.bjStatus = true;
       }
+      if(tag.label=='出库管理'){
+        state.ckglStatus = true;
+      }
       if (tag.label == '付费申请') {
         state.pqStatus = true;
       }

+ 9 - 0
src/views/InventoryManagement/inventory/config/mainList.json

@@ -16,6 +16,15 @@
   "tip": false,
   "column": [
     {
+      "label": "货权人",
+      "prop": "purchaserId",
+      "index": 1,
+      "width": 120,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
       "label": "盘点单号",
       "prop": "sysNo",
       "index": 2,

+ 104 - 14
src/views/InventoryManagement/inventory/detailsPage.vue

@@ -7,6 +7,8 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
+        <el-button type="info" @click="getData" size="small">刷新资料
+        </el-button>
         <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
           class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
@@ -19,8 +21,11 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
+            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
@@ -41,6 +46,9 @@
               :props="{ checkStrictly: true, emitPath: false, label: 'title' }" clearable @change="storagetreeChange">
             </el-cascader>
           </template>
+          <template slot-scope="{column}" slot="storageIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{column.label}}</span>
+          </template>
         </avue-form>
       </trade-card>
       <trade-card title="盘点明细">
@@ -51,6 +59,14 @@
               <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
                 :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             </div>
+            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                :disabled="detailData.status == 1">删除</el-button>
+          </template>
+          <template slot="storageIdHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot="itemIdHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
           </template>
           <template slot="inventoryForm" slot-scope="{ row,disabled }">
             <el-input-number size="small" v-model="row.inventory" @change="calculateChange(row)" :controls="false"
@@ -67,12 +83,17 @@
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
+      <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+        <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
+        </check>
+      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, revokeWarehousing } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -80,10 +101,13 @@ import uploadFile from "@/components/upload-file/main";
 import { getCurrentDate } from "@/util/date";
 import { getToken } from "@/util/auth";
 import { number } from "echarts";
+import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
+      checkData: {},
+      checkDialog: false,
       form: {},
       checkScheduleDialog: false,
       tableOption: {},
@@ -152,7 +176,8 @@ export default {
       subLoading: false,
       pageLoading: false,
       batchNo: '',
-      storagetreeList: []
+      storagetreeList: [],
+      roleName:localStorage.getItem("roleName")
     };
   },
   props: {
@@ -163,7 +188,8 @@ export default {
   components: {
     feeInfo,
     checkSchedule,
-    uploadFile
+    uploadFile,
+    check
   },
   async created() {
     if (this.detailData.status == 1) {
@@ -193,6 +219,24 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+    check() {
+      this.checkData = this.$route.query.check
+      this.checkDialog = true
+    },
+    //关闭审核
+    choceCheckFun() {
+      this.checkDialog = false;
+    },
+    getData() {
+      getAllgoods().then(res => {
+        this.findObject(this.tableOption.column, "itemId").dicData =
+          res.data.data;
+      })
+      getStoragetree().then(res => {
+        this.storagetreeList = res.data.data;
+      })
+      this.getStorage()
+    },
     getAllWorkDicts() {
       getAllgoods().then(res => {
         this.findObject(this.tableOption.column, "itemId").dicData =
@@ -204,7 +248,7 @@ export default {
     },
     calculateChange(row) {
       // console.log(row)
-      row.surplusLoss = Number(row.inventory ? row.inventory : 0) - Number(row.storageInQuantity ? row.storageInQuantity : 0)
+      row.surplusLoss = (Number(row.inventory ? row.inventory : 0) - Number(row.storageInQuantity ? row.storageInQuantity : 0)).toFixed(2)
       // row.balanceNumber = Number(row.inventory ? row.inventory : 0)
       // row.surplusLoss = Number(row.inventory ? row.inventory : 0) - Number(row.balanceNumber ? row.balanceNumber : 0)
       // row.balanceMoney = Number(row.price ? row.price : 0) * Number(row.row.balanceNumber)
@@ -271,11 +315,21 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.$message({
-          type: "success",
-          message: "删除成功!"
-        });
-        this.itemsVOList.splice(row.$index, 1);
+        if (row.id) {
+          // delItem({ itemId: row.id }).then(res => {
+          //   this.$message({
+          //     type: "success",
+          //     message: "删除成功!"
+          //   });
+          //   this.itemsVOList.splice(row.$index, 1);
+          // });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.itemsVOList.splice(row.$index, 1);
+        }
       });
     },
     getDetail(id) {
@@ -351,7 +405,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.buttonLoading = true
+        this.subLoading = true
         const data = {
           id: this.form.id,
           checkType: 'PD',
@@ -363,14 +417,50 @@ export default {
         checkWarehousing(data).then(res => {
           if (res.data.success) {
             this.$message.success("操作成功!")
-            this.viewDisabled = true
-            this.approverDisabled = true
           }
+        }).finally(() => {
+          this.subLoading = false
+          this.getDetail(this.form.id)
         })
-      }).finally(() => {
-        this.buttonLoading = false
       })
     },
+    revokeCheck() {
+      this.$confirm("确定撤销审核此订单?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.subLoading = true;
+        let data = {
+          ...this.form,
+          billType: 'PD',
+          itemsVOList: this.itemsVOList,
+          orderFilesList: this.orderFilesList
+        };
+        revokeWarehousing(data).then(res => {
+          if (res.data.success) {
+            this.$message.success("操作成功!")
+          }
+        }).finally(() => {
+          this.subLoading = false
+          this.getDetail(this.form.id)
+        })
+      })
+    },
+    addData(row) {
+      console.log(row)
+      if (row == 'purchaserId') {
+        this.$router.push(`/basicData/customerInformation/index`);
+      } else if (row == 'corpId') {
+        this.$router.push(`/basicData/customerManagement/supplierMaterial/index`);
+      } else if (row == 'storage') {
+        this.$router.push(`/basicData/basicStorageType/index`);
+      } else if (row == 'storageId') {
+        this.$router.push(`/basicData/basicStorageDesc/index`);
+      } else if (row == 'itemId') {
+        this.$router.push(`/basicData/commodityType/index`);
+      }
+    },
     getTemplate() {
       window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
     },

+ 8 - 0
src/views/InventoryManagement/inventory/index.vue

@@ -14,6 +14,13 @@
                     <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(row, index)">删除
                     </el-button>
                 </template>
+                <template slot-scope="{ row,index}" slot="purchaserId">
+                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.purchaser }}
+                    </span>
+                </template>
+                <template slot="purchaserIdSearch">
+                    <crop-select v-model="search.purchaserId" corpType="KH" :refresh="false"></crop-select>
+                </template>
                 <template slot="stockTimeSearch">
                     <el-date-picker v-model="search.stockTime" type="daterange" start-placeholder="开始日期"
                         end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
@@ -263,6 +270,7 @@ export default {
             let data = this.deepClone(Object.assign({}, params, this.search2));
             delete data.stockTime;
             data.billType = "RK"
+            data.status = 3
             this.loading2 = true;
             getList(page.currentPage, page.pageSize, data)
                 .then(res => {

+ 152 - 0
src/views/approveData/configuration/mainList4.json

@@ -0,0 +1,152 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 24,
+  "dialogWidth": "60%",
+  "align": "center",
+  "height": "auto",
+  "searchSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 180,
+  "stripe": true,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn": false,
+  "headerAlign": "center",
+  "column": [
+    {
+      "label": "业务类型",
+      "prop": "processType",
+      "searchFilterable": true,
+      "type": "select",
+      "hide": true,
+      "showColumn": false,
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dicData": [],
+      "search": true,
+      "overHidden": true,
+      "index": 1
+    },
+    {
+      "label": "业务类型",
+      "prop": "checkType",
+      "search": false,
+      "overHidden": true,
+      "width": 100,
+      "index": 2
+    },
+    {
+      "label": "审核状态",
+      "prop": "auditStatus",
+      "type": "select",
+      "dicData": [],
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "search": true,
+      "searchValue": "S",
+      "overHidden": true,
+      "index": 3
+    },
+    {
+      "label": "往来单位",
+      "prop": "corpId",
+      "search": true,
+      "hide": true,
+      "showColumn": false,
+      "overHidden": true,
+      "width": 100,
+      "index": 4
+    },
+    {
+      "label": "往来单位",
+      "prop": "corpsName",
+      "overHidden": true,
+      "width": 100,
+      "index": 5
+    },
+    {
+      "label": "业务编号",
+      "prop": "billNo",
+      "search": true,
+      "overHidden": true,
+      "width": 100,
+      "index": 6
+    },
+    {
+      "label": "申请人",
+      "prop": "sendUserId",
+      "overHidden": true,
+      "search": true,
+      "index": 7,
+      "width": 100,
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "id"
+      }
+    },
+    {
+      "label": "申请日期",
+      "prop": "sendTime",
+      "type": "date",
+      "format": "yyyy-MM-dd HH:mm:ss",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "search": true,
+      "overHidden": true,
+      "index": 8,
+      "width": 150
+    },
+    {
+      "label": "数量",
+      "prop": "orderQuantity",
+      "overHidden": true,
+      "width": 100,
+      "index": 9
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 100,
+      "index": 10
+    },
+    {
+      "label": "应收金额",
+      "prop": "amountReceivable",
+      "overHidden": true,
+      "width": 100,
+      "index": 11
+    },
+    {
+      "label": "应付金额",
+      "prop": "amountReceivable",
+      "overHidden": true,
+      "width": 100,
+      "index": 11
+    },
+    {
+      "label": "订单备注",
+      "prop": "orderRemark",
+      "overHidden": true,
+      "width": 100,
+      "index": 12
+    }
+  ]
+}

+ 3 - 0
src/views/approveData/index.vue

@@ -61,6 +61,7 @@
 import option from "./configuration/mainList.json";
 import option2 from "./configuration/mainList2.json";
 import option3 from "./configuration/mainList3.json";
+import option4 from "./configuration/mainList4.json";
 import { getList, approvePass, financingExcess } from "@/api/approveData/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
@@ -115,6 +116,8 @@ export default {
       } else {
         if (this.$store.getters.userInfo.tenant_id === "681169") {
           this.option = option3;
+        }else if (this.$store.getters.userInfo.tenant_id === "673511") {
+          this.option = option4;
         } else {
           this.option = option;
         }

+ 60 - 26
src/views/basicData/agreement/detailsPage.vue

@@ -8,6 +8,8 @@
           </el-button>
         </div>
         <div class="add-customer-btn">
+          <el-button type="info" @click="getData" size="small">刷新资料
+          </el-button>
           <el-button type="primary" size="small" @click="editCustomer" :disabled="loadingBtn || detailData.status == 1">
             保存数据
           </el-button>
@@ -17,9 +19,18 @@
       <basic-container v-loading="loadingBtn">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
-            <crop-select v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getCorpData"
+            <crop-select ref="corpId" v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getCorpData"
               :disabled="detailData.status == 1"></crop-select>
           </template>
+          <template slot-scope="{column}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot-scope="{column}" slot="goodsIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot-scope="{column}" slot="warehouseIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
           <!-- <template slot="warehouseId">
             <el-cascader v-model="form.warehouseId" :options="storagetreeList" :show-all-levels="false"
               :disabled="detailData.status == 1"
@@ -31,7 +42,7 @@
       <containerTitle title="基础明细"></containerTitle>
       <basic-container v-loading="loadingBtn">
         <avue-crud ref="crud" :option="optionList" :data="dataList" :table-loading="loading" @saveColumn="saveColumn"
-          @resetColumn="resetColumn" :cell-style="cellStyle"  @row-save="rowSave" @row-update="addUpdate">
+          @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
           <template slot="menuLeft">
             <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
             </el-button>
@@ -58,7 +69,7 @@
 
 <script>
 import { optionList } from "./js/optionList";
-import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist,itemsubmit } from "@/api/basicData/agreement";
+import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist, itemsubmit, itemDel } from "@/api/basicData/agreement";
 export default {
   name: "index",
   data() {
@@ -251,25 +262,45 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+    getData() {
+      getStoragetree().then(res => {
+        this.findObject(this.option.column, "warehouseId").dicData = res.data.data;
+      })
+      getAllgoodstype().then(res => {
+        this.findObject(this.option.column, "goodsId").dicData =
+          res.data.data;
+      })
+      this.$refs.corpId.refreshData()
+    },
+    addData(row) {
+      if (row == 'corpId') {
+        this.$router.push(`/basicData/customerInformation/index`);
+      } else if (row == 'warehouseId') {
+        this.$router.push(`/basicData/basicStorageType/index`);
+      } else if (row == 'goodsId') {
+        this.$router.push(`/basicData/commodityType/index`);
+      }
+
+    },
     getAllWorkDicts() {
       this.getWorkDicts("unit").then(res => {
-      this.findObject(this.optionList.column, "feeUnitId").dicData =
-        res.data.data;
-    });
+        this.findObject(this.optionList.column, "feeUnitId").dicData =
+          res.data.data;
+      });
     },
     cellStyle() {
       return "padding:0;height:40px;";
     },
-    selectValue(value,row) {
-      console.log(value,row)
-      if(row.feeId){
-        row.feeName=value.cname
-      }else{
-        row.feeName=""
+    selectValue(value, row) {
+      console.log(value, row)
+      if (row.feeId) {
+        row.feeName = value.cname
+      } else {
+        row.feeName = ""
       }
     },
     getDetail(id) {
-      this.loadingBtn=true
+      this.loadingBtn = true
       getDetail(id)
         .then(res => {
           // if (res.data.data.warehouseId) {
@@ -310,12 +341,13 @@ export default {
       done()
       this.itemsubmit(form)
     },
-    itemsubmit(row){
+    itemsubmit(row) {
       itemsubmit({
-        pid:this.form.id,
+        pid: this.form.id,
         ...row
-      }).then(res=>{
-         this.$message.success("保存成功");
+      }).then(res => {
+        row = res.data.data
+        this.$message.success("保存成功");
       })
     },
     rowDel(row, index) {
@@ -325,13 +357,13 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          // delItem(row.id).then(res => {
-          //   this.$message({
-          //     type: "success",
-          //     message: "删除成功!"
-          //   });
-          //   this.dataList.splice(index, 1);
-          // });
+          itemDel({ ids: row.id }).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.dataList.splice(index, 1);
+          });
         } else {
           this.$message({
             type: "success",
@@ -427,10 +459,12 @@ export default {
   height: 150px;
   line-height: 150px;
 }
+
 ::v-deep .el-table .cell {
-    padding: 0 2px !important;
+  padding: 0 2px !important;
 }
+
 ::v-deep .avue-crud .el-table .el-form-item__label {
-    left: -1px;
+  left: -1px;
 }
 </style>

+ 5 - 5
src/views/basicData/agreement/js/optionList.js

@@ -75,7 +75,7 @@ export const optionList = {
       rules: [
         {
           required: true,
-          message: "",
+          message: "请输入",
           trigger: blur
         }
       ],
@@ -96,7 +96,7 @@ export const optionList = {
       rules: [
         {
           required: true,
-          message: "",
+          message: "请输入",
           trigger: blur
         }
       ],
@@ -110,7 +110,7 @@ export const optionList = {
       rules: [
         {
           required: true,
-          message: "",
+          message: "请输入",
           trigger: blur
         }
       ],
@@ -124,7 +124,7 @@ export const optionList = {
       rules: [
         {
           required: true,
-          message: "",
+          message: "请输入",
           trigger: blur
         }
       ],
@@ -138,7 +138,7 @@ export const optionList = {
       rules: [
         {
           required: true,
-          message: "",
+          message: "请输入",
           trigger: blur
         }
       ],

+ 159 - 153
src/views/financing/financingLedger/detail.vue

@@ -1,165 +1,171 @@
 <template>
-    <div>
-      <basic-container v-show="show" class="page-crad">
-        <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
-          @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
-          @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-          @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
-          <template slot-scope="{ row,index}" slot="corpId">
-            <span>{{ row.corpName }}</span>
-          </template>
-          <template slot="corpIdSearch">
-            <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
-          </template>
-          <template slot-scope="{ row, index }" slot="menu">
-            <el-button type="text" size="small" :disabled="row.status>0" @click.stop="rowView(row, index)">
-              查看详情
-            </el-button>
-          </template>
-        </avue-crud>
-      </basic-container>
-    </div>
-  </template>
+  <div>
+    <basic-container v-show="show" class="page-crad">
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+        <template slot-scope="{ row,index}" slot="corpId">
+          <span>{{ row.corpName }}</span>
+        </template>
+        <template slot="corpIdSearch">
+          <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
+        </template>
+        <template slot-scope="{ row, index }" slot="menu">
+          <el-button type="text" size="small"  @click.stop="rowView(row, index)">
+            查看详情
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
   
-  <script>
-  import { option } from "./js/optionList";
-  import { getfinancingDetailsList } from "@/api/basicData/financingLedger";
-  
-  export default {
-    name: "index",
-    data() {
-      return {
-        show: true,
-        loading: false,
-        form: {},
-        search: {},
-        detailData: {},
-        dataList: [],
-        selectionList: [],
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0,
-          pageSizes: [10, 50, 100, 200, 300, 400, 500]
-        },
-        option: {},
-      };
+<script>
+import { option } from "./js/optionList2";
+import { getfinancingDetailsList } from "@/api/basicData/financingLedger";
+
+export default {
+  name: "index",
+  data() {
+    return {
+      show: true,
+      loading: false,
+      form: {},
+      search: {},
+      detailData: {},
+      dataList: [],
+      selectionList: [],
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(195), option);
+    // this.getWorkDicts("in_section").then(res => {
+    //   this.findObject(this.option.column, "inSection").dicData = res.data.data;
+    //   this.$refs.crud.init();
+    // });
+    this.option.height = window.innerHeight - 210;
+    this.getAllWorkDicts()
+  },
+  methods: {
+    getAllWorkDicts() {
+      this.getWorkDicts("financing_type").then(res => {
+        this.findObject(this.option.column, "financingType").dicData =
+          res.data.data;
+      });
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
     },
-    async created() {
-      this.option = await this.getColumnData(this.getColumnName(194), option);
-      // this.getWorkDicts("in_section").then(res => {
-      //   this.findObject(this.option.column, "inSection").dicData = res.data.data;
-      //   this.$refs.crud.init();
-      // });
-      this.option.height = window.innerHeight - 210;
+    cellStyle() {
+      return "padding:0;height:40px;";
     },
-    methods: {
-      searchCriteriaSwitch(type) {
-        if (type) {
-          this.option.height = this.option.height - 46;
-        } else {
-          this.option.height = this.option.height + 46;
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    newAdd() {
+      this.show = false;
+    },
+    rowView(row) {
+      this.$router.push({
+        path: "/salesManagement/outStock/index",
+        query: {
+          generateId: row.id
         }
-        this.$refs.crud.getTableHeight();
-      },
-      cellStyle() {
-        return "padding:0;height:40px;";
-      },
-      //点击搜索按钮触发
-      searchChange(params, done) {
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.search);
-      },
-      newAdd() {
-        this.show = false;
-      },
-      rowView(row) {
-        this.$router.push({
-          path: "/salesManagement/outStock/index",
-          query: {
-            generateId: row.id
+      });
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      params.corpId = this.$route.query.corpId
+      getfinancingDetailsList(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.search)
+      )
+        .then(res => {
+          if (res.data.data.records) {
+            res.data.data.records.forEach(e => {
+              e.itemLoading = true;
+            });
           }
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+        })
+        .finally(() => {
+          this.loading = false;
         });
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        this.dataList.forEach(item => {
-          this.$refs.crud.toggleRowExpansion(item, false);
+    },
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(195),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
         });
-        getfinancingDetailsList(
-          page.currentPage,
-          page.pageSize,
-          Object.assign(params, this.search)
-        )
-          .then(res => {
-            if (res.data.data.records) {
-              res.data.data.records.forEach(e => {
-                e.itemLoading = true;
-              });
-            }
-            this.dataList = res.data.data.records ? res.data.data.records : [];
-            this.page.total = res.data.data.total;
-          })
-          .finally(() => {
-            this.loading = false;
-          });
-      },
-      editOpen(row, status) {
-        this.detailData = {
-          id: row.id,
-          status: status
-        };
-        this.show = false;
-      },
-      currentChange(val) {
-        this.page.currentPage = val;
-      },
-      sizeChange(val) {
-        this.page.currentPage = 1;
-        this.page.pageSize = val;
-      },
-      async saveColumn() {
-        const inSave = await this.saveColumnData(
-          this.getColumnName(194),
-          this.option
-        );
-        if (inSave) {
-          this.$nextTick(() => {
-            this.$refs.crud.doLayout();
-          });
-          this.$message.success("保存成功");
-          //关闭窗口
-          this.$refs.crud.$refs.dialogColumn.columnBox = false;
-        }
-      },
-      async resetColumn() {
-        this.option = option;
-        const inSave = await this.delColumnData(this.getColumnName(194), option);
-        if (inSave) {
-          this.$nextTick(() => {
-            this.$refs.crud.doLayout();
-          });
-          this.$message.success("重置成功");
-          this.$refs.crud.$refs.dialogColumn.columnBox = false;
-        }
-      },
-      //返回列表
-      backToList() {
-        this.detailData = this.$options.data().detailData;
-        this.show = true;
-        this.onLoad(this.page, this.search);
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(195), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    //返回列表
+    backToList() {
+      this.detailData = this.$options.data().detailData;
+      this.show = true;
+      this.onLoad(this.page, this.search);
     }
-  };
-  </script>
-  
-  <style scoped>
-  .page-crad ::v-deep .basic-container__card {
-    height: 94.2vh;
   }
-  </style>
+};
+</script>
+  
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+</style>
   

+ 1 - 1
src/views/financing/financingLedger/index.vue

@@ -81,7 +81,7 @@ export default {
       this.$router.push({
         path: "/financing/financingLedger/detail",
         query: {
-          Id: row.id
+          corpId: row.corpId
         }
       });
     },

+ 1 - 1
src/views/financing/financingLedger/js/optionList.js

@@ -36,7 +36,7 @@ export const option ={
       prop: "lastIssueAmount",
     },
     {
-      label: "本期增加金额",
+      label: "本期借款金额",
       prop: "currentIssueAmount",
     },
     {

+ 176 - 0
src/views/financing/financingLedger/js/optionList2.js

@@ -0,0 +1,176 @@
+export const option ={
+  searchShow: true,
+  searchMenuSpan: 8,
+  align: "center",
+  searchSpan: 8,
+  tip: false,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  delBtn: false,
+  menuWidth: 70,
+  searchIcon: true,
+  searchIndex: 2,
+  column: [
+    {
+      label: "系统编号",
+      prop: "sysNo",
+    },
+    {
+      label: "客户",
+      prop: "corpId",
+      searchSpan: 8,
+    },
+    {
+      label: "融资日期",
+      prop: "financingDate",
+      type: "date",
+      format: 'yyyy-MM-dd',
+      valueFormat: 'yyyy-MM-dd',
+      searchSpan: 8,
+    },
+    {
+      label: "融资类别",
+      prop: "financingType",
+      type: "select",
+      dataType: 'number',
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      dicData: [],
+    },
+    {
+      label: "融资金额",
+      prop: "financingAmount",
+    },
+  ]
+}
+export const optionList ={
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  column: [
+    {
+      label: "分类明细",
+      prop: "parameter",
+      overHidden: true,
+      index: 1
+    },
+    {
+      label: "工资标准",
+      prop: "salary",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      index: 2
+    },
+    {
+      label: "工作量工资标准",
+      prop: "workloadSalaryName",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 120,
+      index: 3
+    },
+    {
+      label: "虚拟工作量工资标准",
+      prop: "virtualWorkloadSalary",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 140,
+      index: 4
+    },
+    {
+      label: "双休日工作量工资标准",
+      prop: "doubleCease",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 160,
+      index: 5
+    },
+    {
+      label: "日常考核工资标准",
+      prop: "dailyAssessmentCriteriaName",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 120,
+      index: 6
+    },
+    {
+      label: "虚拟双休日工作量工资标准",
+      prop: "virtualDoubleCease",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 170,
+      index: 7
+    },
+    {
+      label: "虚拟日常考核标准",
+      prop: "virtualDailyAssessmentCriteria",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 120,
+      index: 8
+    },
+    {
+      label: "学期绩效工资标准",
+      prop: "termPerformanceSalaryName",
+      precision: 2,
+      type: "number",
+      controls: false,
+      overHidden: true,
+      cell: true,
+      hide: true,
+      showColumn: false,
+      width: 120,
+      index: 9
+    },
+    {
+      label: "备注",
+      prop: "remarks",
+      overHidden: true,
+      cell: true,
+      index: 10
+    }
+  ]
+}

+ 23 - 4
src/views/financing/financingManagement/detailsPage.vue

@@ -21,6 +21,8 @@
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
+            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
@@ -39,6 +41,11 @@
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
+      <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+        <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
+        </check>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -48,10 +55,13 @@ import { getDetail, submit, checkFinancing } from "@/api/basicData/financing";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
+import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
+      checkData: {},
+      checkDialog: false,
       form: {},
       checkScheduleDialog: false,
       option: {
@@ -163,7 +173,8 @@ export default {
   components: {
     feeInfo,
     checkSchedule,
-    uploadFile
+    uploadFile,
+    check
   },
   async created() {
     if (this.detailData.status == 1) {
@@ -182,6 +193,14 @@ export default {
     });
   },
   methods: {
+    check() {
+      this.checkData = this.$route.query.check
+      this.checkDialog = true
+    },
+    //关闭审核
+    choceCheckFun() {
+      this.checkDialog = false;
+    },
     cellStyle() {
       return "padding:0;height:40px;";
     },
@@ -230,7 +249,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.buttonLoading = true
+        this.subLoading = true
         const data = {
           id: this.form.id,
           checkType: 'rzgl',
@@ -244,9 +263,9 @@ export default {
             this.$message.success("操作成功!")
             this.option.disabled = true;
           }
+        }).finally(() => {
+          this.subLoading = false
         })
-      }).finally(() => {
-        this.buttonLoading = false
       })
     },
     //返回列表

+ 2 - 2
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -131,7 +131,7 @@
     {
       "index": 6,
       "prop": "length",
-      "label": "长度(mm)",
+      "label": "长度(m)",
       "overHidden": true,
       "cell": true,
       "width": 100
@@ -139,7 +139,7 @@
     {
       "index": 8,
       "prop": "thickness",
-      "label": "厚度(mm)",
+      "label": "厚度(m)",
       "overHidden": true,
       "cell": true,
       "width": 100

+ 65 - 23
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -21,8 +21,11 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
+            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
@@ -31,11 +34,11 @@
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
-            <crop-select v-model="form.purchaserId" corpType="KH" @getCorpData="getKHData"
-              :disabled="detailData.status == 1"></crop-select>
+            <crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
+              @getCorpData="getKHData" :disabled="detailData.status == 1"></crop-select>
           </template>
           <template slot="corpId">
-            <crop-select v-model="form.corpId" corpType="GYS" @getCorpData="getGYSData"
+            <crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
               :disabled="detailData.status == 1"></crop-select>
           </template>
           <template slot="storageId">
@@ -122,7 +125,7 @@
       </trade-card>
       <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
         feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'C'"
-        :inCropId="true" :tabShow="3" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
+        :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
       <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" /> -->
       <containerTitle title="上传附件"></containerTitle>
@@ -134,6 +137,11 @@
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
+      <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+        <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
+        </check>
+      </el-dialog>
     </div>
     <el-dialog title="导入" append-to-body :close-on-click-modal="false" :visible.sync="excelBox" width="555px">
       <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter" :upload-error="uploadError">
@@ -151,19 +159,21 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, delItem } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, delItem, revokeWarehousing } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
 import { getToken } from "@/util/auth";
-import { contrastObj, contrastList } from "@/util/contrastData";
+import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
+import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
+      checkData: {},
+      checkDialog: false,
       subLoading: false,
-      buttonLoading: false,
       form: {},
       excelBox: false,
       excelOption: {
@@ -302,6 +312,7 @@ export default {
       olditemsVOList: [],
       oldorderFeesList: [],
       oldorderFilesList: [],
+      roleName:localStorage.getItem("roleName")
     };
   },
   props: {
@@ -312,7 +323,8 @@ export default {
   components: {
     feeInfo,
     checkSchedule,
-    uploadFile
+    uploadFile,
+    check
   },
   async created() {
     if (this.detailData.status == 1) {
@@ -339,6 +351,14 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+    check() {
+      this.checkData = this.$route.query.check
+      this.checkDialog = true
+    },
+    //关闭审核
+    choceCheckFun() {
+      this.checkDialog = false;
+    },
     getData() {
       getAllgoods().then(res => {
         this.findObject(this.tableOption.column, "itemId").dicData =
@@ -348,6 +368,8 @@ export default {
         this.storagetreeList = res.data.data;
       })
       this.getStorage()
+      this.$refs.purchaser.refreshData()
+      this.$refs.corpId.refreshData()
     },
     getAllWorkDicts() {
       getAllgoods().then(res => {
@@ -474,7 +496,6 @@ export default {
           }
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
-          this.buttonLoading = false;
           let data = {
             ...this.form,
             billType: 'RK',
@@ -501,7 +522,6 @@ export default {
           })
             .finally(() => {
               this.subLoading = false;
-              this.buttonLoading = false;
             });
         } else {
           return false;
@@ -522,7 +542,6 @@ export default {
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            this.buttonLoading = true
             const data = {
               id: this.form.id,
               checkType: 'RK',
@@ -531,15 +550,15 @@ export default {
               pageLabel: "入库管理",
               checkFlag: 1,
             }
+            this.subLoading = true
             checkWarehousing(data).then(res => {
               if (res.data.success) {
                 this.$message.success("操作成功!")
-                this.viewDisabled = true
-                this.approverDisabled = true
               }
+            }).finally(() => {
+              this.subLoading = false
+              this.getDetail(this.form.id)
             })
-          }).finally(() => {
-            this.buttonLoading = false
           })
         })
       } else {
@@ -548,7 +567,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.buttonLoading = true
+          this.subLoading = true
           const data = {
             id: this.form.id,
             checkType: 'RK',
@@ -560,16 +579,40 @@ export default {
           checkWarehousing(data).then(res => {
             if (res.data.success) {
               this.$message.success("操作成功!")
-              this.viewDisabled = true
-              this.approverDisabled = true
             }
+          }).finally(() => {
+            this.subLoading = false
+            this.getDetail(this.form.id)
           })
         }).finally(() => {
-          this.buttonLoading = false
+
         })
       }
-
-
+    },
+    revokeCheck() {
+      this.$confirm("确定撤销审核此订单?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let orderFeesList = this.$refs.feeInfo.submitData();
+        this.subLoading = true;
+        let data = {
+          ...this.form,
+          billType: 'RK',
+          itemsVOList: this.itemsVOList,
+          orderFeesList: orderFeesList,
+          orderFilesList: this.orderFilesList
+        };
+        revokeWarehousing(data).then(res => {
+          if (res.data.success) {
+            this.$message.success("操作成功!")
+          }
+        }).finally(() => {
+          this.subLoading = false
+          this.getDetail(this.form.id)
+        })
+      })
     },
     calculateChange(row) {
       row.storageAmount = (row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)
@@ -597,7 +640,6 @@ export default {
       }
     },
     addData(row) {
-      console.log(row)
       if (row == 'purchaserId') {
         this.$router.push(`/basicData/customerInformation/index`);
       } else if (row == 'corpId') {
@@ -616,7 +658,7 @@ export default {
       if (
         contrastObj(this.form, this.oldform) ||
         contrastList(this.itemsVOList, this.olditemsVOList) ||
-        contrastList(orderFeesList, this.oldorderFeesList) ||
+        contrastList2(orderFeesList, this.oldorderFeesList) ||
         contrastList(this.orderFilesList, this.oldorderFilesList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {

+ 9 - 0
src/views/purchasingManagement/inStock/index.vue

@@ -178,6 +178,15 @@ export default {
             this.show = false;
         },
         generate(row) {
+            if (this.$store.getters.ckglStatus) {
+                return this.$alert("出库管理已存在,请保存出库管理再进行操作", "温馨提示", {
+                    confirmButtonText: "确定",
+                    type: "warning",
+                    callback: action => {
+                        console.log(action);
+                    }
+                });
+            }
             this.$router.push({
                 path: "/salesManagement/outStock/index",
                 query: {

+ 13 - 13
src/views/salesManagement/outStock/config/customerContact.json

@@ -10,9 +10,9 @@
   "headerAlign": "center",
   "menuWidth": 160,
   "refreshBtn": false,
-  "showSummary": true,
+  "showSumary": true,
   "indexSlot": true,
-  "summaryText": "合计",
+  "sumaryText": "合计",
   "sumColumnList": [
     {
       "name": "sliceNumber",
@@ -47,7 +47,7 @@
     {
       "index": 2,
       "prop": "storageId",
-      "label": "库区",
+      "label": "*库区",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -69,7 +69,7 @@
     {
       "index": 3,
       "prop": "itemId",
-      "label": "品名",
+      "label": "*品名",
       "type": "select",
       "props": {
         "label": "cname",
@@ -91,7 +91,7 @@
     {
       "index": 4,
       "prop": "itemType",
-      "label": "品牌",
+      "label": "*品牌",
       "overHidden": true,
       "cell": true,
       "rules": [
@@ -106,7 +106,7 @@
     {
       "index": 5,
       "prop": "grade",
-      "label": "等级",
+      "label": "*等级",
       "overHidden": true,
       "cell": true,
       "rules": [
@@ -121,7 +121,7 @@
     {
       "index": 6,
       "prop": "length",
-      "label": "长度(mm)",
+      "label": "长度(m)",
       "overHidden": true,
       "cell": true,
       "width": 100
@@ -129,7 +129,7 @@
     {
       "index": 8,
       "prop": "thickness",
-      "label": "厚度(mm)",
+      "label": "厚度(m)",
       "overHidden": true,
       "cell": true,
       "width": 100
@@ -137,7 +137,7 @@
     {
       "index": 10,
       "prop": "billNo",
-      "label": "捆包号",
+      "label": "*捆包号",
       "overHidden": true,
       "cell": true,
       "rules": [
@@ -152,7 +152,7 @@
     {
       "index": 11,
       "prop": "sliceNumber",
-      "label": "片数",
+      "label": "*片数",
       "overHidden": true,
       "cell": true,
       "type":"number",
@@ -170,7 +170,7 @@
     {
       "index": 12,
       "prop": "storageInQuantity",
-      "label": "出库量",
+      "label": "*出库量",
       "overHidden": true,
       "rules": [
         {
@@ -185,7 +185,7 @@
     {
       "index": 13,
       "prop": "unit",
-      "label": "出库单位",
+      "label": "*出库单位",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -206,7 +206,7 @@
     {
       "index": 14,
       "prop": "price",
-      "label": "出库单价",
+      "label": "*出库单价",
       "overHidden": true,
       "cell": true,
       "rules": [

+ 117 - 23
src/views/salesManagement/outStock/detailsPage.vue

@@ -7,6 +7,8 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
+        <el-button type="info" @click="getData" size="small">刷新资料
+        </el-button>
         <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
           class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
@@ -19,8 +21,11 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
+            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
@@ -29,11 +34,11 @@
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
-            <crop-select v-model="form.purchaserId" corpType="KH" :refresh="false" @getCorpData="getKHData"
-              :disabled="detailData.status == 1"></crop-select>
+            <crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
+              @getCorpData="getKHData" :disabled="detailData.status == 1"></crop-select>
           </template>
           <template slot="corpId">
-            <crop-select v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
+            <crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
               :disabled="detailData.status == 1"></crop-select>
           </template>
           <template slot="storageId">
@@ -42,6 +47,15 @@
               clearable @change="storagetreeChange">
             </el-cascader>
           </template>
+          <template slot-scope="{column}" slot="purchaserIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot-scope="{column}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot-scope="{column}" slot="storageIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{column.label}}</span>
+          </template>
         </avue-form>
       </trade-card>
       <trade-card title="出库明细">
@@ -62,6 +76,12 @@
             <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
               :disabled="detailData.status == 1" circle></el-button>
           </template>
+          <template slot="storageIdHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
+          <template slot="itemIdHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+          </template>
           <template slot="oneCode" slot-scope="{ row, index }">
             <el-popover placement="right" width="160" trigger="click">
               <el-image style="width: 160px; height: 80px" :src="row.oneCode" :fit="fit"></el-image>
@@ -105,7 +125,7 @@
       </trade-card>
       <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
         feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
-        :inCropId="true" :tabShow="2" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
+        :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
       <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" /> -->
       <containerTitle title="上传附件"></containerTitle>
@@ -117,23 +137,31 @@
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
+      <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+        <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
+        </check>
+      </el-dialog>
     </div>
   </div>
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
 import { getToken } from "@/util/auth";
-import { contrastObj, contrastList } from "@/util/contrastData";
+import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
 import { getCurrentDate } from "@/util/date";
+import check from "@/components/check/check";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
+      checkData: {},
+      checkDialog: false,
       form: {},
       checkScheduleDialog: false,
       tableOption: {},
@@ -247,6 +275,7 @@ export default {
       olditemsVOList: [],
       oldorderFeesList: [],
       oldorderFilesList: [],
+      roleName:localStorage.getItem("roleName")
     };
   },
   props: {
@@ -257,7 +286,8 @@ export default {
   components: {
     feeInfo,
     checkSchedule,
-    uploadFile
+    uploadFile,
+    check
   },
   async created() {
     if (this.detailData.status == 1) {
@@ -287,6 +317,26 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+    check() {
+      this.checkData = this.$route.query.check
+      this.checkDialog = true
+    },
+    //关闭审核
+    choceCheckFun() {
+      this.checkDialog = false;
+    },
+    getData() {
+      getAllgoods().then(res => {
+        this.findObject(this.tableOption.column, "itemId").dicData =
+          res.data.data;
+      })
+      getStoragetree().then(res => {
+        this.storagetreeList = res.data.data;
+      })
+      this.getStorage()
+      this.$refs.purchaser.refreshData()
+      this.$refs.corpId.refreshData()
+    },
     getAllWorkDicts() {
       getAllgoods().then(res => {
         this.findObject(this.tableOption.column, "itemId").dicData =
@@ -401,9 +451,9 @@ export default {
             delete e.id
           })
           this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 0);
+          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 1);
           this.oldform = this.deepClone(res.data.data);
-          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 0));
+          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 1));
           this.getStorage()
         })
         .finally(() => {
@@ -470,7 +520,7 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
               }).then(() => {
-                this.buttonLoading = true
+                this.subLoading = true
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
@@ -485,9 +535,10 @@ export default {
                     this.viewDisabled = true
                     this.approverDisabled = true
                   }
+                }).finally(() => {
+                  this.subLoading = false
+                  this.getDetail(this.form.id)
                 })
-              }).finally(() => {
-                this.buttonLoading = false
               })
             } else {
               this.$confirm("此订单余额不足,是否继续确认提交审核?", {
@@ -495,7 +546,7 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
               }).then(() => {
-                this.buttonLoading = true
+                this.subLoading = true
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
@@ -510,9 +561,10 @@ export default {
                     this.viewDisabled = true
                     this.approverDisabled = true
                   }
+                }).finally(() => {
+                  this.subLoading = false
+                  this.getDetail(this.form.id)
                 })
-              }).finally(() => {
-                this.buttonLoading = false
               })
             }
           })
@@ -525,7 +577,7 @@ export default {
               cancelButtonText: "取消",
               type: "warning"
             }).then(() => {
-              this.buttonLoading = true
+              this.subLoading = true
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
@@ -542,7 +594,8 @@ export default {
                 }
               })
             }).finally(() => {
-              this.buttonLoading = false
+              this.subLoading = false
+              this.getDetail(this.form.id)
             })
           } else {
             this.$confirm("此订单余额不足,是否继续确认提交审核?", {
@@ -550,7 +603,7 @@ export default {
               cancelButtonText: "取消",
               type: "warning"
             }).then(() => {
-              this.buttonLoading = true
+              this.subLoading = true
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
@@ -565,14 +618,40 @@ export default {
                   this.viewDisabled = true
                   this.approverDisabled = true
                 }
+              }).finally(() => {
+                this.subLoading = false
+                this.getDetail(this.form.id)
               })
-            }).finally(() => {
-              this.buttonLoading = false
             })
           }
         })
       }
     },
+    revokeCheck() {
+      this.$confirm("确定撤销审核此订单?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let orderFeesList = this.$refs.feeInfo.submitData();
+        this.subLoading = true;
+        let data = {
+          ...this.form,
+          billType: 'CK',
+          itemsVOList: this.itemsVOList,
+          orderFeesList: orderFeesList,
+          orderFilesList: this.orderFilesList
+        };
+        revokeWarehousing(data).then(res => {
+          if (res.data.success) {
+            this.$message.success("操作成功!")
+          }
+        }).finally(() => {
+          this.subLoading = false
+          this.getDetail(this.form.id)
+        })
+      })
+    },
     getTemplate() {
       window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
     },
@@ -582,7 +661,7 @@ export default {
       if (
         contrastObj(this.form, this.oldform) ||
         contrastList(this.itemsVOList, this.olditemsVOList) ||
-        contrastList(orderFeesList, this.oldorderFeesList) ||
+        contrastList2(orderFeesList, this.oldorderFeesList) ||
         contrastList(this.orderFilesList, this.oldorderFilesList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
@@ -624,6 +703,19 @@ export default {
     moveDown(row, index) {
       this.itemsVOList[index] = this.itemsVOList.splice(index + 1, 1, row)[0]
     },
+    addData(row) {
+      if (row == 'purchaserId') {
+        this.$router.push(`/basicData/customerInformation/index`);
+      } else if (row == 'corpId') {
+        this.$router.push(`/basicData/customerManagement/supplierMaterial/index`);
+      } else if (row == 'storage') {
+        this.$router.push(`/basicData/basicStorageType/index`);
+      } else if (row == 'storageId') {
+        this.$router.push(`/basicData/basicStorageDesc/index`);
+      } else if (row == 'itemId') {
+        this.$router.push(`/basicData/commodityType/index`);
+      }
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(191),
@@ -675,10 +767,12 @@ export default {
 ::v-deep .select-component {
   display: flex !important;
 }
+
 ::v-deep .el-table .cell {
-    padding: 0 2px !important;
+  padding: 0 2px !important;
 }
+
 ::v-deep .avue-crud .el-table .el-form-item__label {
-    left: -1px;
+  left: -1px;
 }
 </style>

+ 6 - 1
src/views/salesManagement/outStock/index.vue

@@ -68,10 +68,13 @@ export default {
         this.getAllWorkDicts()
     },
     activated() {
+        if (!this.$store.getters.ckglStatus && !this.show) {
+            this.show = true;
+        }
         setTimeout(() => {
             if (this.$route.query.generateId && this.show) {
-                // this.detailData.id = this.$route.query.generateId
                 this.show = false;
+                this.$store.commit("IN_CKGL_STATUS");
             }
             if (this.$route.query.check && this.show) {
                 this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
@@ -132,6 +135,7 @@ export default {
                 status: status
             };
             this.show = false;
+            this.$store.commit("IN_CKGL_STATUS");
         },
         //点击搜索按钮触发
         searchChange(params, done) {
@@ -182,6 +186,7 @@ export default {
             }
             this.detailData = this.$options.data().detailData;
             this.show = true;
+            this.$store.commit("OUT_CKGL_STATUS");
             this.onLoad(this.page, this.search);
         },
         async saveColumn() {