lichao 3 lat temu
rodzic
commit
45538c531b

+ 8 - 0
src/api/standAlone/handoverSheet.js

@@ -68,3 +68,11 @@ export function getAttachment(data) {
     params:data
   })
 }
+// 确认提交
+export function submitConfirm(params) {
+  return request({
+    url: '/api/trade-project/handover/confirm',
+    method: 'get',
+    params
+  })
+}

+ 37 - 21
src/components/report-dialog/main.vue

@@ -145,11 +145,16 @@ export default {
       &userId=${this.searchValue.userId}
       &goodsId=${this.searchValue.goodsId}`
         });
-      } else if (name == "客户资料-客户资料.ureport.xml") {
-        this.$router.push({
-          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&id=${this.reportId}&tenantId=${tenantId}`
-        });
-      } else if (name == "国内贸易-库存账.ureport.xml") {
+      }
+      // else if (name == "客户资料-客户资料.ureport.xml") {
+      //   this.$router.push({
+      //     path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&id=${this.reportId}&tenantId=${tenantId}`,
+      //     query: {
+      //
+      //     }
+      //   });
+      // }
+      else if (name == "国内贸易-库存账.ureport.xml") {
         this.$router.push({
           path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
           query: {
@@ -167,30 +172,41 @@ export default {
         });
       } else if (name == "国内贸易-客户确认.ureport.xml") {
         this.$router.push({
-          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}
-          &orgOrderNo=${this.searchValue.orgOrderNo}
-          &corpId=${this.searchValue.corpId}
-          &salesCompany=${this.searchValue.salesCompany}
-          &businessStartDate=${this.searchValue.businessStartDate}
-          &businessEndDate=${this.searchValue.businessEndDate}
-          &storageId=${this.searchValue.storageId}
-          &arrivalAddress=${this.searchValue.arrivalAddress}
-          &arrivalContact=${this.searchValue.arrivalContact}
-          &arrivalTel=${this.searchValue.arrivalTel}
-          &createUser=${this.searchValue.createUser}
-          &createTimeStart=${this.searchValue.createTimeStart}
-          &createTimeEnd=${this.searchValue.createTimeEnd}
-          &tenantId=${tenantId}`
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            orgOrderNo: this.searchValue.orgOrderNo,
+            corpId: this.searchValue.corpId,
+            salesCompany: this.searchValue.salesCompany,
+            businessStartDate: this.searchValue.businessStartDate,
+            businessEndDate: this.searchValue.businessEndDate,
+            storageId: this.searchValue.storageId,
+            arrivalAddress:this.searchValue.arrivalAddress,
+            arrivalContact: this.searchValue.arrivalContact,
+            arrivalTel: this.searchValue.arrivalTel,
+            createUser: this.searchValue.createUser,
+            createTimeStart: this.searchValue.createTimeStart,
+            createTimeEnd: this.searchValue.createTimeEnd,
+            tenantId: tenantId,
+          }
         });
       } else if (name == "经销商-可用库存表.ureport.xml") {
         this.$router.push({
-          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&tradeType=JXS&tenantId=${tenantId}`
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tradeType: 'JXS',
+            tenantId: tenantId,
+          },
         });
       } else {
         let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content
           .user_id;
         this.$router.push({
-          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&id=${this.reportId}&userId=${userId}&tenantId=${tenantId}`
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            id: this.reportId,
+            userId: userId,
+            tenantId: tenantId,
+          },
         });
       }
       this.$emit("onClose", false);

+ 2 - 0
src/views/dealer/allocation/config/mainList.json

@@ -18,6 +18,8 @@
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [],
+  "expand": true,
+  "expandWidth": 55,
   "column": [
     {
       "label": "系统编号",

+ 8 - 4
src/views/dealer/allocation/detail.vue

@@ -298,7 +298,7 @@
     <report-dialog
       :switchDialog="switchDialog"
       :reportId="form.id"
-      reportName=""
+      reportName="经销商-调拨单"
       @onClose="onClose()"
     />
     <!--    商品弹窗-->
@@ -692,7 +692,7 @@ export default {
     },
     //返回列表
     backToList() {
-      if (this.verification()) {
+      if (this.verification(true)) {
         this.$emit("goBack");
       }
     },
@@ -817,7 +817,7 @@ export default {
     },
     getKHData(row) {},
     // 验证新旧值对比
-    verification() {
+    verification(isBack = false) {
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(this.dataList, this.oldDataList)) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
@@ -827,7 +827,11 @@ export default {
         }).then(() => {
           this.editCustomer();
         }).catch(() => {
-          return false;   //取消改动数据
+          if (isBack) {
+            this.$emit("goBack");
+          } else {
+            return false;   //取消改动数据
+          }
         })
       } else {
         return true;

+ 98 - 2
src/views/dealer/allocation/index.vue

@@ -19,6 +19,7 @@
         @search-criteria-switch="searchCriteriaSwitch"
         @saveColumn="saveColumn"
         @resetColumn="resetColumn"
+        @expand-change="expandChange"
       >
         <template slot="menuLeft">
           <el-button
@@ -46,6 +47,16 @@
           >删除
           </el-button>
         </template>
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemList"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          >
+          </avue-crud>
+        </template>
         <template slot="storageNameSearch">
           <warehouse-select
             v-model="search.storageId"
@@ -74,7 +85,7 @@
 import option from "./config/mainList.json";
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getList, deleteList} from "@/api/dealer/allocation";
+import {getList, deleteList, dataDetail} from "@/api/dealer/allocation";
 
 export default {
   name: "index",
@@ -106,6 +117,75 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: [],
       },
+      // 展开明细列表配置
+      itemOption: {
+        align: "center",
+        border: true,
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品编码",
+            prop: "code",
+            width: 130,
+            overHidden: true
+          },
+          {
+            label: "商品名称",
+            prop: "cname",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "规格",
+            prop: "typeno",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "花纹",
+            prop: "brandItem",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "负荷指数",
+            prop: "specsOne",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "速度级别",
+            prop: "specsTwo",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "单位",
+            prop: "unit",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "结余库存",
+            prop: "inventoryNumber",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "调拨件数",
+            prop: "actualQuantity",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            width: 100,
+            overHidden: true
+          }
+        ]
+      },
     }
   },
   async created() {
@@ -176,6 +256,10 @@ export default {
       this.loading = true;
       getList(queryParams).then(res => {
         this.dataList = res.data.data.records;
+        this.dataList.forEach(item => {
+          this.$set(item, 'itemLoading', true);
+          this.$set(item, 'itemList', []);
+        })
         this.page.total = res.data.data.total;
         this.option.height = window.innerHeight - 240;
         this.$nextTick(() => {
@@ -281,10 +365,22 @@ export default {
         this.onLoad(this.page)
       })
     },
+    //展开箭头触发
+    expandChange(row) {
+      if (row.itemLoading) {
+        dataDetail(row.id).then(res => {
+          row.itemList = res.data.data.deliveryItemsList? res.data.data.deliveryItemsList: [];
+        }).finally(() => {
+          row.itemLoading = false;
+        })
+      }
+    },
   },
 }
 </script>
 
 <style scoped>
-
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
 </style>

+ 1 - 0
src/views/reimbursement/detail.vue

@@ -689,6 +689,7 @@ export default {
       if (this.verification()) {
         const data = {
           id : this.form.id,
+          serialNo: this.form.serialNo,
           checkType: 'fybx',
           url: '/reimbursement/index',
           pageStatus:"this.$store.getters.reimbursementStatus",

+ 25 - 0
src/views/workManagement/handoverSheet/config/mainList.json

@@ -46,6 +46,31 @@
       "unlinkPanels": true,
       "searchRange": true,
       "search": true
+    },
+    {
+      "label": "接手人",
+      "prop": "handingUserName",
+      "overHidden": true
+    },
+    {
+      "label": "是否收费",
+      "prop": "chargeStatus",
+      "overHidden": true
+    },
+    {
+      "label": "是否确认",
+      "prop": "confirmStatus",
+      "overHidden": true
+    },
+    {
+      "label": "确认时间",
+      "prop": "confirmTime",
+      "overHidden": true
+    },
+    {
+      "label": "是否外部交接单",
+      "prop": "external",
+      "overHidden": true
     }
   ]
 }

+ 111 - 10
src/views/workManagement/handoverSheet/detail.vue

@@ -19,6 +19,15 @@
           v-if="disabled"
         >编 辑</el-button>
         <el-button
+          v-if="form.id && loginUser === form.handingUser && form.confirmStatus !== 1"
+          type="primary"
+          size="small"
+          class="el-button--small-yh"
+          :loading="btnLoading"
+          @click="submitConfirm"
+          :disabled="!form.id || disabled"
+        >提交确认</el-button>
+        <el-button
           v-if="checker && form.status != 3"
           type="primary"
           size="small"
@@ -35,7 +44,7 @@
         <el-button
           type="primary"
           v-if="!checkDisabled"
-          :disabled="!form.id || disabled"
+          :disabled="!form.id || disabled || form.confirmStatus !== 1"
           size="small"
           @click="pleaseCheck"
           :loading="btnLoading"
@@ -70,9 +79,48 @@
               v-model="form.corpId"
               @getCorpData="getKHData"
               corpType="KH"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || checkDisabled || confirmDisabled"
             />
           </template>
+          <template slot="chargeStatus">
+            <el-switch
+              v-model="form.chargeStatus"
+              active-text="是"
+              inactive-text="否"
+              :active-value="1"
+              :inactive-value="0"
+              :disabled="disabled || checkDisabled || confirmDisabled"
+              @change="chargeStatusChange"
+            ></el-switch>
+          </template>
+          <template slot="handingUser">
+            <el-select
+              v-model="form.handingUser"
+              filterable
+              clearable
+              size="small"
+              placeholder="请选择"
+              :disabled="disabled || checkDisabled || form.chargeStatus == 0 || confirmDisabled"
+              @change="handingUserChange"
+            >
+              <el-option
+                v-for="(item,index) in userList"
+                :key="index"
+                :label="item.realName"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </template>
+          <template slot="external">
+            <el-switch
+              v-model="form.external"
+              active-text="是"
+              inactive-text="否"
+              :active-value="1"
+              :inactive-value="0"
+              :disabled="disabled || checkDisabled || confirmDisabled"
+            ></el-switch>
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="详情内容"/>
@@ -91,7 +139,7 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || checkDisabled || confirmDisabled"
             >录入明细</el-button>
             <el-button
               type="info"
@@ -106,13 +154,13 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || checkDisabled || confirmDisabled"
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             <el-button
               size="small"
               icon="el-icon-upload"
               type="text"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || checkDisabled || confirmDisabled"
               @click="annexOpen(row, index)"
             >附件</el-button>
             <el-button
@@ -120,7 +168,7 @@
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || checkDisabled || confirmDisabled"
             >删除</el-button>
           </template>
           <template slot="quantity" slot-scope="{ row, index }">
@@ -261,7 +309,8 @@ import {
   removeGoods,
   pleaseCheck,
   saveAttached,
-  getAttachment} from "@/api/standAlone/handoverSheet";
+  getAttachment,
+  submitConfirm} from "@/api/standAlone/handoverSheet";
 import reportDialog from "@/components/report-dialog/main";
 
 export default {
@@ -277,6 +326,13 @@ export default {
     reportDialog
   },
   data() {
+    const validateHandingUser = (rule, value, callback) => {
+      if (this.form.chargeStatus == 1 && !this.form.handingUser) {
+        callback(new Error('接手人不能为空'))
+      } else {
+        callback()
+      }
+    }
     return {
       disabled: false,
       pageLoading: false,
@@ -331,6 +387,24 @@ export default {
             span: 8,
           },
           {
+            label: "是否收费",
+            prop: "chargeStatus",
+            span: 8,
+          },
+          {
+            label: "接手人",
+            prop: "handingUser",
+            span: 8,
+            rules: [
+              {validator: validateHandingUser, trigger: 'change'}
+            ]
+          },
+          {
+            label: "是否外部交接单",
+            prop: "external",
+            span: 8,
+          },
+          {
             label: "交接备注",
             prop: "remarks",
             type: "textarea",
@@ -374,6 +448,7 @@ export default {
       oldForm: {},
       oldDataList: [],
       checkDisabled: false, // 审核状态
+      confirmDisabled: false, // 提交状态
       checker: false,
       checkId: '',
       batchNo:'',
@@ -396,7 +471,7 @@ export default {
       this.userList = res.data.data;
     });
     getUserInfo().then(res => {
-      this.loginUser = res.data.data.realName;
+      this.loginUser = res.data.data.id;
     })
     getDeptTree().then(res => {
       this.dic = res.data.data
@@ -435,7 +510,8 @@ export default {
         this.oldForm = {...this.form};
         this.oldDataList = [...this.dataList];
         this.checkDisabled = this.form.status > 0? true: false;
-        if (this.form.status > 0) {
+        this.confirmDisabled = this.form.confirmStatus === 1? true: false;
+        if (this.form.status > 0 || this.form.confirmStatus === 1) {
           this.option.column.map(e => {
             this.$set(e, 'disabled', true)
           })
@@ -452,7 +528,7 @@ export default {
     openEdit() {
       this.disabled = false;
       this.option.column.map(e => {
-        if (this.checkDisabled) {
+        if (this.checkDisabled || this.confirmDisabled) {
           this.$set(e, 'disabled', true)
         } else {
           if (e.prop != 'serialNo') {
@@ -598,6 +674,7 @@ export default {
       if (this.verification()) {
         const data = {
           id : this.form.id,
+          serialNo: this.form.serialNo,
           checkType: 'jjd',
           url: '/workManagement/handoverSheet/index',
           pageStatus:"this.$store.getters.handOverStatus",
@@ -657,6 +734,30 @@ export default {
         })
       }
     },
+    // 是否收费选择触发
+    chargeStatusChange(data) {
+      if (data === 0) this.form.handingUser = null;
+    },
+    // 接手人选择触发
+    handingUserChange(data) {
+      this.$set(this.form, 'handingUserName', this.userList.find(item => data == item.id).realName);
+    },
+    // 提交确认
+    submitConfirm() {
+      this.$confirm("提交确认?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.btnLoading = true
+        submitConfirm({id: this.form.id}).then(res => {
+          console.log(res.data.data)
+          this.queryData(this.form.id)
+        }).finally(() => {
+          this.btnLoading = false;
+        })
+      })
+    },
   },
 }
 </script>

+ 13 - 1
src/views/workManagement/handoverSheet/index.vue

@@ -42,7 +42,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 3"
+            :disabled="scope.row.status == 3 || scope.row.confirmStatus === 1"
           >删除
           </el-button>
         </template>
@@ -55,6 +55,18 @@
         <template slot="serialNo" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.serialNo }}</span>
         </template>
+        <template slot="chargeStatus" slot-scope="scope">
+          <span v-if="scope.row.chargeStatus === 0">否</span>
+          <span v-else>是</span>
+        </template>
+        <template slot="confirmStatus" slot-scope="scope">
+          <span v-if="scope.row.confirmStatus === 0">否</span>
+          <span v-else>是</span>
+        </template>
+        <template slot="external" slot-scope="scope">
+          <span v-if="scope.row.external === 0">否</span>
+          <span v-else>是</span>
+        </template>
       </avue-crud>
     </basic-container>
     <detail-page