web100 2 lat temu
rodzic
commit
87a0beae2f

+ 10 - 0
src/api/tirePartsMall/basicData/listingManagement/index.js

@@ -40,3 +40,13 @@ export const listAll = (params) => {
     method: 'get'
   })
 }
+//删除
+export function remove(ids) {
+  return request({
+    url: '/api/blade-sales-part/productLaunch/remove',
+    method: 'post',
+    params:{
+      ids
+    }
+  })
+}

+ 7 - 0
src/api/tirePartsMall/purchasingManagement/warehouseEntryOrder.js

@@ -68,3 +68,10 @@ export const dotList = (data) => {
     params: data
   })
 }
+export const getWarehouseKeeper = (data) => {
+  return request({
+    url: '/api/blade-user/getWarehouseKeeper',
+    method: 'GET',
+    params: data
+  })
+}

+ 2 - 4
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -8,13 +8,11 @@ export const getList = (params) => {
   })
 }
 //删除
-export const remove = (ids) => {
+export const remove = (data) => {
   return request({
     url: '/api/blade-sales-part/order/update',
     method: 'post',
-    params: {
-      ids,
-    }
+    data
   })
 }
 export const getDetails = (data) => {

+ 0 - 1
src/components/finance/financialAccount.vue

@@ -24,7 +24,6 @@
             </el-select>
             <el-button icon="el-icon-search" size="small" @click="openDialog(row, index, 1)"></el-button>
           </span>
-
           <span v-else>{{ corpsName }}</span>
         </template>
         <!--        <template slot-scope="{row,index}" slot="costType">-->

+ 10 - 0
src/components/report-dialog/main.vue

@@ -174,6 +174,15 @@ export default {
           }
         });
       }
+      else if (name == "轮胎商城-销售订单.ureport.xml") {
+        console.log('this.reportId',this.reportId);
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            id: this.reportId,
+          }
+        });
+      }
       // 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}`,
@@ -324,6 +333,7 @@ export default {
   watch: {
     switchDialog: function(i) {
       this.visible = i;
+      console.log(this.$router.currentRoute.name);
       this.query = {
         name: this.reportName ? this.reportName : this.$router.currentRoute.name
       };

+ 108 - 322
src/views/dealer/allocation/detail.vue

@@ -2,351 +2,143 @@
   <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          :loading="btnLoading"
-        >返回列表</el-button>
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList" :loading="btnLoading">返回列表</el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          @click.stop="openEdit"
-          v-if="disabled"
-        >编 辑</el-button>
-        <el-button
-          v-if="checker && form.status != 3"
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
+        <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit" v-if="disabled">编
+          辑</el-button>
+        <el-button v-if="checker && form.status != 3" type="primary" size="small" class="el-button--small-yh"
           @click.stop="openCheckDialog">
           审批
         </el-button>
-        <el-button
-          v-if="form.status > 0"
-          @click.native="checkScheduleDialog = true,checkId=form.id"
-          type="primary"
-          size="small"
-        >审核进度</el-button>
-        <el-button
-          v-if="confirmDisabled"
-          :disabled="disabled"
-          size="small"
-          type="primary"
-          @click="repealAllot"
-          :loading="btnLoading"
-        >撤销调拨</el-button>
-        <el-button
-          v-if="!confirmDisabled"
-          :disabled="!form.id || disabled"
-          size="small"
-          type="primary"
-          @click="confirmAllot"
-          :loading="btnLoading"
-        >确认调拨</el-button>
-        <el-button
-          type="success"
-          :disabled="!form.id"
-          size="small"
-          @click="copyDoc"
-          :loading="btnLoading"
-          v-if="false"
-        >复制单据</el-button>
-        <el-button
-          type="primary"
-          @click="editCustomer"
-          size="small"
-          :loading="btnLoading"
-        >保存数据</el-button>
+        <el-button v-if="form.status > 0" @click.native="checkScheduleDialog = true, checkId = form.id" type="primary"
+          size="small">审核进度</el-button>
+        <el-button v-if="confirmDisabled" :disabled="disabled" size="small" type="primary" @click="repealAllot"
+          :loading="btnLoading">撤销调拨</el-button>
+        <el-button v-if="!confirmDisabled" :disabled="!form.id || disabled" size="small" type="primary"
+          @click="confirmAllot" :loading="btnLoading">确认调拨</el-button>
+        <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading"
+          v-if="false">复制单据</el-button>
+        <el-button type="primary" @click="editCustomer" size="small" :loading="btnLoading">保存数据</el-button>
       </div>
     </div>
     <div class="customer-main">
-      <containerTitle title="基础信息"/>
+      <containerTitle title="基础信息" />
       <basic-container :showBtn="true">
-        <avue-form
-          ref="form"
-          class="trading-form"
-          v-model="form"
-          :option="option"
-        >
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="freightUser">
-            <el-select
-              v-model="form.freightUser"
-              filterable
-              clearable
-              size="small"
-              placeholder="请选择"
-              :disabled="disabled || confirmDisabled"
-            >
-              <el-option
-                v-for="(item,index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.realName"
-              ></el-option>
+            <el-select v-model="form.freightUser" filterable clearable size="small" placeholder="请选择"
+              :disabled="disabled || confirmDisabled">
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName"
+                :value="item.realName"></el-option>
             </el-select>
           </template>
           <template slot="createUser">
-            <el-select
-              v-model="form.createUser"
-              filterable
-              clearable
-              size="small"
-              placeholder="请选择"
-              disabled
-            >
-              <el-option
-                v-for="(item,index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.id"
-              ></el-option>
+            <el-select v-model="form.createUser" filterable clearable size="small" placeholder="请选择" disabled>
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName"
+                :value="item.id"></el-option>
             </el-select>
           </template>
           <template slot="createDept">
-            <avue-input-tree
-              leaf-only
-              style="width: 100%;"
-              size="small"
-              :props="{ label: 'title' }"
-              v-model="form.createDept"
-              placeholder=" "
-              type="tree"
-              :dic="dic"
-              :nodeClick="deptClick"
-              disabled=""
-            ></avue-input-tree>
+            <avue-input-tree leaf-only style="width: 100%;" size="small" :props="{ label: 'title' }"
+              v-model="form.createDept" placeholder=" " type="tree" :dic="dic" :nodeClick="deptClick"
+              disabled=""></avue-input-tree>
           </template>
           <template slot="storageId">
-            <warehouse-select
-              v-model="form.storageId"
-              :configuration="configurationWarehouse"
-              :disabled="disabled || confirmDisabled"
-            />
+            <warehouse-select v-model="form.storageId" :configuration="configurationWarehouse"
+              :disabled="disabled || confirmDisabled" />
           </template>
           <template slot="allotStorageId">
-            <warehouse-select
-              v-model="form.allotStorageId"
-              :configuration="configurationWarehouse"
-              :disabled="disabled || confirmDisabled"
-            />
+            <warehouse-select v-model="form.allotStorageId" :configuration="configurationWarehouse"
+              :disabled="disabled || confirmDisabled" />
           </template>
         </avue-form>
       </basic-container>
-      <containerTitle title="商品信息"/>
+      <containerTitle title="商品信息" />
       <basic-container>
-        <avue-crud
-          ref="crud"
-          :data="dataList"
-          :option="tableOption"
-          :cell-style="cellStyle"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-        >
+        <avue-crud ref="crud" :data="dataList" :option="tableOption" :cell-style="cellStyle" @saveColumn="saveColumn"
+          @resetColumn="resetColumn">
           <template slot="menuLeft">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newDetails"
-              :disabled="disabled || confirmDisabled"
-            >录入明细</el-button>
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click="openReport"
-              :disabled="!form.id || dataList.length === 0"
-            >报表打印</el-button>
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
+              :disabled="disabled || confirmDisabled">录入明细</el-button>
+            <el-button type="info" icon="el-icon-printer" size="small" @click="openReport"
+              :disabled="!form.id || dataList.length === 0">报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowCell(row, index)"
-              :disabled="disabled || confirmDisabled"
-            >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
-            <el-button
-              size="small"
-              icon="el-icon-delete"
-              type="text"
-              @click="rowDel(row, index)"
-              :disabled="disabled || confirmDisabled"
-            >删除</el-button>
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+              :disabled="disabled || confirmDisabled">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
+            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+              :disabled="disabled || confirmDisabled">删除</el-button>
           </template>
           <template slot="code" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
-              <el-select
-                v-model="row.code"
-                placeholder="请选择"
-                filterable
-                size="small"
-                style="width:60%"
-                @change="codeChange(row, index)"
-              >
-                <el-option
-                  v-for="item in goodsoptions"
-                  :key="item.id"
-                  :label="item.code"
-                  :value="item.code"
-                >
+              <el-select v-model="row.code" placeholder="请选择" filterable size="small" style="width:60%"
+                @change="codeChange(row, index)">
+                <el-option v-for="item in goodsoptions" :key="item.id" :label="item.code" :value="item.code">
                 </el-option>
               </el-select>
-              <el-button
-                icon="el-icon-search"
-                size="small"
-                @click="rePick(row, index)"
-              ></el-button>
+              <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
             </span>
             <span v-else> {{ row.code }}</span>
           </template>
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
-              <el-select
-                v-model="row.itemId"
-                placeholder="请选择"
-                size="small"
-                filterable
-                style="width:60%"
-                @change="cnameChange(row, index)"
-              >
-                <el-option
-                  v-for="item in goodsoptions"
-                  :key="item.id"
-                  :label="item.cname"
-                  :value="item.id"
-                >
+              <el-select v-model="row.itemId" placeholder="请选择" size="small" filterable style="width:60%"
+                @change="cnameChange(row, index)">
+                <el-option v-for="item in goodsoptions" :key="item.id" :label="item.cname" :value="item.id">
                 </el-option>
               </el-select>
-              <el-button
-                icon="el-icon-search"
-                size="small"
-                @click="rePick(row, index)"
-              ></el-button>
+              <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
             </span>
             <span v-else> {{ row.cname }}</span>
           </template>
           <template slot="actualQuantity" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.actualQuantity"
-              size="small"
-              :controls="false"
-              :precision="0"
-              style="width: 100%"
-              @change="actualQuantityChange(row)"
-            />
+            <el-input-number v-if="row.$cellEdit" v-model="row.actualQuantity" size="small" :controls="false"
+              :precision="0" style="width: 100%" @change="actualQuantityChange(row)" />
             <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
           </template>
           <template slot="deliveryAmount" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.deliveryAmount"
-              size="small"
-              :controls="false"
-              :precision="2"
-              style="width: 100%"
-            />
+            <el-input-number v-if="row.$cellEdit" v-model="row.deliveryAmount" size="small" :controls="false"
+              :precision="2" style="width: 100%" />
             <span v-else>{{ row.deliveryAmount | decimalFormat }}</span>
           </template>
         </avue-crud>
       </basic-container>
     </div>
 
-    <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"
-      >
+    <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>
-    <el-dialog
-      append-to-body
-      title="审批进度"
-      class="el-dialogDeep"
-      :visible.sync="checkScheduleDialog"
-      width="40%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <check-schedule
-        :checkId="checkId"
-        :batchNo="batchNo"
-        @choceScheduleFun="choceScheduleFun"
-      >
+    <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
       </check-schedule>
     </el-dialog>
     <!--    报表-->
-    <report-dialog
-      :switchDialog="switchDialog"
-      :reportId="form.id"
-      reportName="经销商-调拨单"
-      @onClose="onClose()"
-    />
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="经销商-调拨单" @onClose="onClose()" />
     <!--    商品弹窗-->
-    <el-dialog
-      title="导入商品"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      @close="closeGoods"
-      top="5vh"
-      v-dialog-drag
-    >
+    <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods" top="5vh"
+      v-dialog-drag>
       <span>
         <el-row>
           <el-col :span="4">
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree
-                    :option="treeOption"
-                    @node-click="nodeClick"
-                    :style="treeStyle"
-                  />
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle" />
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
           <el-col :span="20">
-            <avue-crud
-              :option="goodsOption"
-              :table-loading="loading"
-              :data="goodsListShow"
-              ref="goodsCrud"
-              :search.sync="search"
-              @search-change="searchChange"
-              @selection-change="selectionChange"
-              @row-click="rowClick"
-              :page.sync="page"
-              @on-load="onLoad"
-              @saveColumn="saveGoodsColumn"
-              @resetColumn="resetGoodsColumn"
-              :cell-style="cellStyle"
-            >
+            <avue-crud :option="goodsOption" :table-loading="loading" :data="goodsListShow" ref="goodsCrud"
+              :search.sync="search" @search-change="searchChange" @selection-change="selectionChange"
+              @row-click="rowClick" :page.sync="page" @on-load="onLoad" @saveColumn="saveGoodsColumn"
+              @resetColumn="resetGoodsColumn" :cell-style="cellStyle">
               <template slot="menuLeft">
                 <el-tabs v-model="activeName" @tab-click="tabHandle">
                   <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
@@ -354,22 +146,12 @@
                 </el-tabs>
               </template>
               <template slot-scope="scope" slot="menu">
-                <el-button
-                  type="text"
-                  icon="el-icon-edit"
-                  size="small"
-                  @click.stop="importStagList(scope.row,scope.index)"
-                  v-if="activeName=='searchList'"
-                  :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1"
-                >选择
+                <el-button type="text" icon="el-icon-edit" size="small"
+                  @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
+                  :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
                 </el-button>
-                <el-button
-                  type="text"
-                  icon="el-icon-delete"
-                  size="small"
-                  @click.stop="removeStagList(scope.row,scope.index)"
-                  v-else
-                >移除
+                <el-button type="text" icon="el-icon-delete" size="small"
+                  @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
                 </el-button>
               </template>
             </avue-crud>
@@ -379,12 +161,8 @@
 
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="importGoods"
-          :disabled="selectionList.length == 0 && goodsListSave.length == 0"
-        >导入</el-button
-        >
+        <el-button type="primary" @click="importGoods"
+          :disabled="selectionList.length == 0 && goodsListSave.length == 0">导入</el-button>
       </span>
     </el-dialog>
   </div>
@@ -400,17 +178,19 @@ import {
   IntegerFormat
 } from "@/util/validate";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getUserInfo} from "@/api/system/user";
-import {getDeptTree} from "@/api/system/dept";
+import { getUserInfo } from "@/api/system/user";
+import { getDeptTree } from "@/api/system/dept";
 import { getCurrentDate } from "@/util/date";
-import {dataDetail, typeSave, removeGoods, confirmAllot, repealAllot} from "@/api/dealer/allocation";
+import { dataDetail, typeSave, removeGoods, confirmAllot, repealAllot } from "@/api/dealer/allocation";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import reportDialog from "@/components/report-dialog/main";
-import {getDeptLazyTree,
-  getGoods,} from "@/api/basicData/customerInquiry";
-import {selectGoodsNum} from "@/api/basicData/inventoryAccount";
+import {
+  getDeptLazyTree,
+  getGoods,
+} from "@/api/basicData/customerInquiry";
+import { selectGoodsNum } from "@/api/basicData/inventoryAccount";
 
 export default {
   name: "detail",
@@ -548,7 +328,7 @@ export default {
       treeOption: {
         nodeKey: "id",
         lazy: true,
-        treeLoad: function(node, resolve) {
+        treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
           getDeptLazyTree(parentId).then(res => {
             resolve(
@@ -590,7 +370,7 @@ export default {
       oldDataList: [],
       checker: false,
       checkId: '',
-      batchNo:'',
+      batchNo: '',
       checkDialog: false,
       checkScheduleDialog: false,
       checkData: {},
@@ -682,9 +462,9 @@ export default {
     queryData(id) {
       this.pageLoading = true;
       dataDetail(id).then(res => {
-        this.$set(this,'form',res.data.data)
-        this.confirmDisabled = this.form.deliveryStatus === '确认调拨'? true: false;
-        this.dataList = this.form.deliveryItemsList? this.form.deliveryItemsList: [];
+        this.$set(this, 'form', res.data.data)
+        this.confirmDisabled = this.form.deliveryStatus === '确认调拨' ? true : false;
+        this.dataList = this.form.deliveryItemsList ? this.form.deliveryItemsList : [];
         this.oldForm = this.deepClone(this.form);
         this.oldDataList = this.deepClone(this.dataList);
       }).finally(() => {
@@ -733,7 +513,7 @@ export default {
           this.$set(this.form, 'deliveryItemsList', this.dataList)
           this.btnLoading = true;
           typeSave(this.form).then(res => {
-            this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
+            this.$message({ type: "success", message: this.form.id ? "修改成功!" : "新增成功!" });
             this.queryData(res.data.data.id);
           }).finally(() => {
             this.btnLoading = false;
@@ -816,7 +596,7 @@ export default {
         }
       });
     },
-    getKHData(row) {},
+    getKHData(row) { },
     // 验证新旧值对比
     verification(isBack = false) {
       if (contrastObj(this.form, this.oldForm) ||
@@ -842,21 +622,21 @@ export default {
       this.$set(this.form, 'deptName', data.title)
     },
     //打开审核
-    openCheckDialog(){
-      this.checkData  = this.detailData.check
+    openCheckDialog() {
+      this.checkData = this.detailData.check
       this.checkDialog = true;
     },
     //关闭审核
-    choceCheckFun(){
+    choceCheckFun() {
       this.checkDialog = false;
     },
-    choceScheduleFun(){
+    choceScheduleFun() {
       this.checkScheduleDialog = false
     },
     // 报表
     openReport() {
       if (this.verification()) {
-        this.switchDialog =! this.switchDialog;
+        this.switchDialog = !this.switchDialog;
       }
     },
     // 报表关闭
@@ -881,7 +661,7 @@ export default {
             row.inventoryNumber = res.data.data;
           })
           row.itemId = e.id;
-          row.storageQuantity =  e.storageQuantity;
+          row.storageQuantity = e.storageQuantity;
           row.cname = e.cname;
           row.code = e.code;
           row.corpId = e.corpId;
@@ -906,7 +686,7 @@ export default {
           }).then(res => {
             row.inventoryNumber = res.data.data;
           })
-          row.storageQuantity =  e.storageQuantity
+          row.storageQuantity = e.storageQuantity
           row.cname = e.cname;
           row.code = e.code;
           row.corpId = e.corpId;
@@ -926,6 +706,7 @@ export default {
         if (this.selectionList.length != 1) {
           return this.$message.error("重新选择的时候只能选择一条数据");
         } else {
+          console.log(1);
           this.selectionList.forEach(e => {
             this.dataList.forEach(async (item, index) => {
               await selectGoodsNum({
@@ -956,6 +737,7 @@ export default {
         }
       } else {
         if (this.goodsListSave.length > 0) { // 暂存的有数据
+          console.log(2);
           this.goodsListSave.forEach(async e => {
             await selectGoodsNum({
               goodsId: e.id,
@@ -985,13 +767,18 @@ export default {
             });
           });
         } else {
-          this.selectionList.forEach(async e => {
+          this.selectionList.forEach(async (e) => {
             await selectGoodsNum({
               goodsId: e.id,
               tradeType: 'JXS',
               storageId: this.form.storageId
             }).then(res => {
-              e.inventoryNumber = res.data.data;
+              console.log(res.data.data);
+              if (res.data.data && res.data.data[0] && res.data.data[0].balanceQuantity) {
+                e.inventoryNumber = res.data.data[0].balanceQuantity;
+              } else {
+                e.inventoryNumber = '0.00';
+              }
             })
             this.dataList.push({
               itemId: e.id,
@@ -1010,6 +797,7 @@ export default {
               inventoryNumber: e.inventoryNumber,
               $cellEdit: true
             });
+            console.log(this.dataList);
           });
         }
       }
@@ -1146,6 +934,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 3 - 3
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -67,10 +67,10 @@ export default {
           label: '公司名称',
           prop: "corporateName",
           type: 'select',
-          dicUrl: "/api/blade-client/corpsattn/get-corp",
+          dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
             props: {
-              label: "dictValue",
-              value: "dictValue"
+              label: "deptName",
+              value: "id"
             }
         }, {
           label: '币别',

+ 1 - 0
src/views/tirePartsMall/basicData/commodityInformation/index.vue

@@ -317,6 +317,7 @@ export default {
         current: page.currentPage,
         size: page.pageSize
       }).then(res => {
+        console.log(123214);
         this.dataList = res.data.data.records ? res.data.data.records : [];
         this.page.total = res.data.data.total;
         this.$nextTick(() => {

+ 4 - 1
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -299,7 +299,7 @@ export default {
           // ]
         }, {
           label: "所属公司",
-          prop: "artsVisionId",
+          prop: "salesCompanyId",
           search: true,
           overHidden: true,
           width: 120,
@@ -642,6 +642,8 @@ export default {
     ,
     //确认创建仓库
     confirmSynchronizationThree() {
+
+      this.formDataThree.salesCompanyName = this.formDataThree.$salesCompanyId
       this.$refs["formDataThree"].validate((valid, done) => {
         done();
         if (valid) {
@@ -809,6 +811,7 @@ export default {
     ,
     //修改提交触发
     editCustomer() {
+      
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {

+ 2 - 0
src/views/tirePartsMall/basicData/customerInformation/index.vue

@@ -375,6 +375,8 @@ export default {
     },
     onLoad(page, params = {}) {
       // this.$refs.crud.refreshTable()
+      console.log('params',params);
+      console.log('this.search',this.search);
       let data = this.deepClone(Object.assign(params, this.search));
       if (data.date && data.date.length > 0) {
         data.startTime = data.date[0]

+ 4 - 4
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -34,11 +34,11 @@ export const option = {
     },
     {
       label: "发货仓库",
-      prop: "deliveryWarehouseName",
+      prop: "deliveryWarehouseId",
       type: 'select',
       props: {
         label: 'cname',
-        value: 'cname'
+        value: 'id'
       },
       dicUrl: '/api/blade-sales-part/storageDesc/listAll',
       overHidden: true,
@@ -89,10 +89,10 @@ export const option = {
       showColumn: false,
       type: 'select',
       dicData: [{
-        label: '',
+        label: '启用',
         value: 0
       }, {
-        label: '',
+        label: '禁用',
         value: 1
       }]
     },

+ 31 - 3
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -12,6 +12,7 @@
                      ref="crud" :key="key" @on-load="onLoad" @selection-change="selectionChange"
                      :before-open="beforeOpen"
                      @row-update="rowUpdate" @search-change="searchChange" @refresh-change="refreshChange"
+                     @row-del="rowDel"
                      @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 273)"
                      @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 273)" :page.sync="page">
             <template slot="filesListForm">
@@ -24,6 +25,8 @@
             <template slot-scope="{type,size,row,index}" slot="menu">
               <el-button :size="size" :type="type" @click="$refs.crud.rowEdit(row, index)">编辑
               </el-button>
+              <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除
+              </el-button>
               <el-tooltip :content="`${row.upAndDownShelves == 0?'上架':'下架'}`" placement="top">
                 <el-switch
                     style="margin-left: 10px"
@@ -72,7 +75,8 @@ import {
   submit,
   batchOperationProductLaunch,
   getDetail,
-  listAll
+  listAll,
+  remove
 } from "@/api/tirePartsMall/basicData/listingManagement/index.js";
 import {getToken} from "@/util/auth";
 
@@ -154,7 +158,7 @@ export default {
         height: "auto",
         searchMenuPosition: "right",
         align: "center",
-        menuWidth: 100,
+        menuWidth: 150,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,
@@ -236,7 +240,8 @@ export default {
           overHidden: true,
         }, {
           label: "共享公司",
-          prop: "sharedCompany",
+          prop: "salesCompanyName",
+          // searchProp: "sharedCompanyList",
           search: true,
           overHidden: true,
           multiple: true,
@@ -306,6 +311,12 @@ export default {
       this.onLoad(this.page, this.search)
     },
     searchChange(params, done) {
+      console.log(params);
+      console.log(params.$salesCompanyName);
+      // sharedCompanyList
+      this.search.sharedCompanyList = params.salesCompanyName;
+      Vue.delete(params, 'salesCompanyName');
+      Vue.delete(this.search, 'salesCompanyName');
       done();
       this.onLoad(this.page, params)
     },
@@ -322,6 +333,22 @@ export default {
         })
       }
     },
+    rowDel(row,index){
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(()=>{
+        remove(row.id).then((res)=>{
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+          this.dataList.splice(index, 1);
+          this.onLoad(this.page)
+        })
+      })
+    },
     //编辑确定
     rowUpdate(form, index, done, loading) {
       if (this.form.filesList.length > 0) {
@@ -397,6 +424,7 @@ export default {
       }
     },
     onLoad(page, params = {}) {
+      console.log(this.search);
       params = {
         ...params,
         current: page.currentPage,

+ 13 - 11
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -226,12 +226,13 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+
   },
-  activated() {
-    this.$nextTick(() => {
-      this.$refs.crud.doLayout()
-    })
-  },
+  // activated() {
+  //   this.$nextTick(() => {
+  //     this.$refs.crud.doLayout()
+  //   })
+  // },
   methods: {
     addCorpType() {
       // this.$refs["corpType"].validate((valid, done) => {
@@ -316,12 +317,13 @@ export default {
     onLoad(page, params = {}) {
       params = {
         ...params,
-        cname: {
-          like: params.cname // 使用like操作符进行模糊匹配
-        },
-        supplierCategory: {
-          like: params.supplierCategory // 使用like操作符进行模糊匹配
-        },
+        cname: '',
+        // {
+        //   like: params.cname // 使用like操作符进行模糊匹配
+        // },
+        // supplierCategory: {
+        //   like: params.supplierCategory // 使用like操作符进行模糊匹配
+        // },
         current: page.currentPage,
         size: page.pageSize,
         corpType: "GYS",

+ 30 - 21
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -13,8 +13,8 @@
                 <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.statusName != '已入库'"
                     @click="editCustomer">保存数据
                 </el-button>
-                <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '待入库' || form.statusName == '已撤销'"
-                    @click="complete">入库完成
+                <el-button class="el-button--small-yh" type="success" size="small"
+                    v-if="form.statusName == '待入库' || form.statusName == '已撤销'" @click="complete">入库完成
                 </el-button>
                 <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '已入库'"
                     @click="revoke">撤销入库
@@ -92,7 +92,8 @@ import {
     warehousingComplete,
     revoke,
     goodsDetail,
-    dotList
+    dotList,
+    getWarehouseKeeper
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -149,6 +150,7 @@ export default {
                     {
                         label: "业务对象",
                         prop: "customerId",
+
                         type: 'select',
                         props: {
                             label: 'cname',
@@ -170,17 +172,26 @@ export default {
                         overHidden: true,
                         type: 'select',
                         dicUrl: "/api/blade-sales-part/storageDesc/listAll",
+   
                         props: {
                             label: 'cname',
                             value: 'id'
                         },
+                        
                         rules: [
                             {
                                 required: true,
                                 message: " ",
                                 trigger: "blur"
                             }
-                        ]
+                        ],
+                        // change:(data)=>{
+                        // //   console.log(this.$refs);
+                        // getWarehouseKeeper({salesCompanyId:this.form.storageId}).then((res)=>{
+                        //     console.log(res.data.data);
+                        //     this.form.stockClerkId = res.data.data[0].id
+                        // })
+                        // }
                     },
                     {
                         label: '库管',
@@ -202,14 +213,15 @@ export default {
                         prop: "goodsTotalNum",
                         search: false,
                         overHidden: true,
+                        disabled: true
                         // width: 120,
-                        rules: [
-                            {
-                                required: true,
-                                message: " ",
-                                trigger: "blur"
-                            }
-                        ]
+                        // rules: [
+                        //     {
+                        //         required: true,
+                        //         message: " ",
+                        //         trigger: "blur"
+                        //     }
+                        // ]
                     },
                     {
                         label: "业务日期",
@@ -229,18 +241,12 @@ export default {
                     {
                         label: "入库单号",
                         prop: "ordNo",
-                        rules: [
-                            {
-                                required: true,
-                                message: " ",
-                                trigger: "blur"
-                            }
-                        ],
+                        disabled: true
                     },
                     {
                         label: "来源单号",
                         prop: "srcOrdNo",
-                        disabled:true
+                        disabled: true
                     }, {
                         label: '备注',
                         prop: "remarks",
@@ -345,7 +351,7 @@ export default {
                 }, {
                     label: "入库数量",
                     prop: "goodsNum",
-                    disabled:true,
+                    disabled: true,
                     ovrHidden: true,
                 }, {
                     label: "实际数量",
@@ -479,6 +485,8 @@ export default {
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
+                    this.formContacts.brandName = res.data.data.brandName
+                    
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
@@ -530,7 +538,7 @@ export default {
             loading = true;
         },
         //撤销
-        revoke(){
+        revoke() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
@@ -590,6 +598,7 @@ export default {
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                     });
+                    this.form.customerName=this.form.$customerId
                     submit({
                         ...this.form,
                         bizTypeName: "SHGD"

+ 76 - 30
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -1,29 +1,36 @@
 <template>
   <div>
     <basic-container v-show="!detailsOpen">
-      <avue-crud
-          :option="option"
-          :search.sync="search"
-          v-model="form"
-          :table-loading="loading"
-          :data="dataList"
-          ref="crud"
-          :key="key"
-          @on-load="onLoad"
-          @search-change="searchChange"
-          @row-del="rowDel"
-          @refresh-change="refreshChange"
-          @resetColumn="resetColumnTwo('crud','option','optionList',270)"
-          @saveColumn="saveColumnTwo('crud','option','optionList',270)"
-          :page.sync="page">
+      <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+        ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
+        @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 270)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 270)" :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
-          <el-button :size="size" :type="type" @click="check(row)">查看</el-button>
-          <el-button  :size="size" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
+          <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
+          <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>
           <!--<el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>-->
         </template>
+        <template slot-scope="{row,index}" slot="stockClerkName">
+          <el-select placeholder="请选择" v-if="row.$cellEdit" v-model="row.stockClerkName" size="small" filterable
+            allow-create default-first-option clearable>
+            <el-option v-for="item in stockClerkNameList" :key="item" :label="item.account" :value="item"></el-option>
+          </el-select>
+          <span v-else>{{ row.stockClerkName }}</span>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="customerId">
+          <span>{{ row.customerName}}</span>
+        </template>
+        <template slot-scope="{ row, index }" slot="billno">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.billno }}
+          </span>
+        </template>
+        <template slot-scope="{ row, index }" slot="ordNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
+          </span>
+        </template>
       </avue-crud>
     </basic-container>
     <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
@@ -31,9 +38,10 @@
 </template>
 
 <script>
-import {getList, remove} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+import { customerListAll } from "@/api/tirePartsMall/basicData/warehouse"
+import { getList, remove, getWarehouseKeeper } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import detailsPage from "./detailsPage.vue"
-import {dateFormat} from '@/util/date'
+import { dateFormat } from '@/util/date'
 
 export default {
   name: "index",
@@ -43,6 +51,9 @@ export default {
   data() {
     return {
       detailsOpen: false,
+      salesCompanyId: '',
+      storageNameList: [],
+      stockClerkNameList: [],
       loading: false,
       search: {},
       form: {},
@@ -68,7 +79,7 @@ export default {
         searchMenuPosition: "right",
         align: "center",
         size: "small",
-        menuWidth: 100,
+        menuWidth: 50,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,
@@ -76,14 +87,14 @@ export default {
         dialogWidth: "70%",
         summaryText: "合计",
         showSummary: true,
-        sumColumnList:[{
+        sumColumnList: [{
           name: "goodsTotalNum",
           type: "sum",
           decimals: 2
         }],
         column: [{
           label: "入库单号",
-          prop: "ordNo",
+          prop: "billno",
           // billno
           search: true,
           overHidden: true,
@@ -97,7 +108,7 @@ export default {
           ]
         }, {
           label: "来源单号",
-          prop: "srcOrdNo",
+          prop: "ordNo",
           search: true,
           overHidden: true,
           // width: 120,
@@ -130,7 +141,10 @@ export default {
           props: {
             label: 'cname',
             value: 'id'
-          }
+          },
+          // change:(data)=>{
+          //   console.log(this.$refs.crud.DIC.storageName[0].salesCompanyId);
+          // }
         }, {
           label: "商品数量",
           prop: "goodsTotalNum",
@@ -142,6 +156,14 @@ export default {
           prop: "statusName",
           search: true,
           overHidden: true,
+          type: "select",
+          dicData: [{
+            label: "待入库",
+            value: 0
+          }, {
+            label: "已入库",
+            value: 1
+          }],
           // width: 120,
         }, {
           label: "业务日期",
@@ -155,11 +177,17 @@ export default {
           // width: 200
         }, {
           label: "库管",
-          prop: "remarks",
+          prop: "stockClerkName",
           search: true,
           overHidden: true,
+          type: 'select',
+          props: {
+            label: 'name',
+            value: 'id'
+          },
+          dicUrl: "/api/blade-user/getWarehouseKeeper?salesCompanyId=" + JSON.parse(localStorage.getItem("saber-userInfo")).content.dept_id,
           // width: 200
-        },{
+        }, {
           label: "制单人",
           prop: "createUserName",
           searchProp: "createUser",
@@ -216,6 +244,14 @@ export default {
     }
   },
   async created() {
+    customerListAll().then((res) => {
+      this.storageNameList = res.data.data
+      this.salesCompanyId = this.storageNameList[0].salesCompanyId;
+      // stockClerkNameList
+      getWarehouseKeeper({ salesCompanyId: this.salesCompanyId }).then(res => {
+        this.stockClerkNameList = res.data.data;
+      })
+    })
     this.option = await this.getColumnData(this.getColumnName(274), this.optionList);
     this.key++
     let i = 0;
@@ -227,6 +263,10 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+
+  },
+  mounted() {
+    console.log(this.$refs.crud);
   },
   methods: {
     check(row) {
@@ -271,7 +311,7 @@ export default {
         ...params,
         current: page.currentPage,
         size: page.pageSize,
-        bizTypeName: "SHGD",
+        bizTypeName: "SHGD,TKSHGD",
         ...Object.assign(params, this.search)
       }
       this.loading = true
@@ -283,6 +323,14 @@ export default {
         this.loading = false
       })
     },
+    editOpen(row, status) {
+            this.form = row
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            this.detailsOpen = true;
+    },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {
       /**
@@ -310,6 +358,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 1 - 0
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -281,6 +281,7 @@ export default {
       this.onLoad(this.page, this.search)
     },
     rowCell(row,index){
+      this.findObject(this.option.column, "storageName").cell = true
       this.findObject(this.optionList.column, "storageName").cell = true
       this.$refs.crud.rowCell(row, index)
     },

+ 7 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -174,6 +174,7 @@ export default {
         }, 
          {
           label: '商品数量',
+          disabled:true,
           prop: "goodsTotalNum",
           rules: [
             {
@@ -435,6 +436,11 @@ export default {
             spinner: 'el-icon-loading',
             background: 'rgba(255,255,255,0.7)'
           });
+          console.log(this.form)
+          this.form.shipItemsList.forEach(item=>{
+            item.goodsName = item.$goodsId
+          })
+          // this.goodsName;
           submit({
             ...this.form,
             bizTypeName: "FHGD"
@@ -452,6 +458,7 @@ export default {
     },
     refresh(id, type) {
       this.$set(this.optionContactsBack,'addBtn',false)
+      this.$set(this.optionContacts,'addBtn',false)
       this.isDisabled = true
       const loading = this.$loading({
         lock: true,

+ 19 - 2
src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue

@@ -17,7 +17,7 @@
           @saveColumn="saveColumnTwo('crud','option','optionList',270)"
           :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
-          <el-button  :size="size" :type="type" @click="check(row)">查看</el-button>
+          <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
           <el-button  :size="size" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
@@ -27,6 +27,14 @@
           <!--<el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>-->
           <!--<el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>-->
         </template>
+        <template slot-scope="{ row, index }" slot="billno">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.billno }}
+          </span>
+        </template>
+        <template slot-scope="{ row, index }" slot="ordNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
+          </span>
+        </template>
       </avue-crud>
     </basic-container>
     <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
@@ -70,7 +78,7 @@ export default {
         searchMenuPosition: "right",
         align: "center",
         size: "small",
-        menuWidth: 100,
+        menuWidth: 50,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,
@@ -236,6 +244,7 @@ export default {
       this.onLoad(this.page, this.search)
     },
     rowDel(form, index) {
+      console.log(form);
       this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -273,6 +282,14 @@ export default {
         this.loading = false
       })
     },
+    editOpen(row, status) {
+            this.form = row
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            this.detailsOpen = true;
+        },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {
       /**

+ 187 - 76
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -13,9 +13,12 @@
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     @click="editCustomer">保 存
                 </el-button>
-                <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
-                    v-if="form.generateTask !== '已生成'" @click="generateOutbound">生成任务
+                <el-button class="el-button--small-yh" style="margin-left: 6px;"
+                    :class="{ 'el-button--success-yh': buttonColor === 'warning', 'el-button--warning-yh': buttonColor === 'warning' }"
+                    size="small" v-if="form.generateTask !== '已生成'" :disabled="isDisabledTask" @click="generateOutbound">
+                    {{ buttonText }}
                 </el-button>
+
                 <el-dropdown style="padding: 0 6px;line-height: 0">
                     <el-button type="danger" :loading="buttonLoading" :disabled="!form.id || viewDisabled" size="small">
                         售 后<i class="el-icon-arrow-down el-icon--right"></i>
@@ -66,8 +69,7 @@
                             </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
-                                    @click="$refs.formContacts.rowEdit(row, index)">编辑
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="editBtn(row, index)">编辑
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled"
                                     :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
@@ -77,10 +79,10 @@
                     </el-tab-pane>
                     <el-tab-pane label="支付明细" name="payment_details">
                         <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details"
-                            :data="form.paymentRecordsList" @row-save="rowSave" @row-update="rowUpdate"
+                            :data="dataList" @row-save="rowSave" @row-update="rowUpdate"
                             @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)"
                             @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)">
-                            <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+                            <!-- <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
                                     @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
@@ -88,7 +90,7 @@
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
                                     @click="rowDelBox(row, index, 'paymentRecordsList')">删除
                                 </el-button>
-                            </template>
+                            </template> -->
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="出库记录" name="outbound_records">
@@ -109,7 +111,8 @@
                     </el-tab-pane>
                 </el-tabs>
             </trade-card>
-            <report-dialog :switchDialog="switchDialog" @onClose="onClose()"></report-dialog>
+            <report-dialog :switchDialog="switchDialog" reportName="轮胎商城-销售订单" :reportId="form.id"
+                @onClose="onClose()"></report-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="true" :idList="[]" @operationType="operationType"
@@ -131,13 +134,18 @@ import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/w
 import reportDialog from "@/components/report-dialog/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
+import { getList } from "@/api/paymentManagement/paymentRecord"
 export default {
     name: "detailsPage",
     data() {
         return {
+            dataList: [],
             isDisabled: false,
+            isDisabledTask: true,
             contactsOption: [],
             checkData: {},
+            buttonText: '生成任务',
+            buttonColor: 'success', // 初始颜色为success
             checkScheduleDialog: false,
             isApplySettlement: true,
             isConfirmRefundBtn: true,
@@ -158,6 +166,7 @@ export default {
             optionForm: {
                 menuBtn: false,
                 span: 8,
+                disabled: false,
                 column: [{
                     label: '客户',
                     prop: "customerId",
@@ -169,10 +178,12 @@ export default {
                     },
                     cascader: ['recAddress'],
                     change: (data) => {
-                        console.log(data.value);
-                        if (data.value) {
+                        console.log(this.$refs.form.DIC.customerId);
+                        console.log('this.onLoad.id', this.onLoad.id);
+                        if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
                             getCustom({ id: data.value }).then(res => {
                                 console.log(res.data.data);
+                                this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
                                 this.form.storageId = res.data.data.deliveryWarehouseId
                                 this.form.contacts = res.data.data.corpsAttnList[0].cname
                                 this.form.phone = res.data.data.corpsAttnList[0].tel
@@ -554,16 +565,16 @@ export default {
                 dialogWidth: "80%",
                 column: [{
                     label: '支付编号',
-                    prop: 'paymentNumber'
+                    prop: 'serialNumber'
                 }, {
                     label: '金额',
                     prop: 'amount'
                 }, {
                     label: '类型',
-                    prop: 'paymentType'
+                    prop: 'type'
                 }, {
                     label: '支付时间',
-                    prop: 'paymentTime'
+                    prop: 'createTime'
                 }]
             },
             optionOutboundRecords: {},
@@ -661,38 +672,133 @@ export default {
         this.key++
         if (this.onLoad.id && this.detailData.id) {
             console.log(1);
+            this.$set(this.optionForm, 'disabled', true)
+            this.$set(this.optionContactsBack, 'disabled', true)
+            this.isDisabled = true
+
             this.refresh(this.onLoad.id, true)
         } else if (this.onLoad.id) {
+            console.log(2);
             this.refresh(this.onLoad.id, true)
         }
-        if(!this.form.id){
+        if (!this.form.id) {
+            console.log(3);
             this.$set(this.optionContacts, "addBtn", true)
+            this['optionContacts'] = this['optionContactsBack'];
+            this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
         }
     },
     methods: {
-        generateOutbound() {
-            if (this.form.orderItemsList.length <= 0) {
-                this.$message.error('请录入明细');
+        editBtn(row, index) {
+            console.log(123);
+            this.$refs.formContacts.rowEdit(row, index);
+            dotList({
+                storageId: this.form.storageId,
+                goodsId: this.formContacts.goodsId
+            }).then(res => {
+                this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
+            })
+        },
+        //表头编辑
+        confirmEditing() {
+            this.$set(this.optionForm, 'disabled', false)
+            this.$set(this.optionContactsBack, 'disabled', false)
+            this.isDisabled = false
+            console.log('this.form.businessSource', this.form.businessSource);
+            if (this.form.businessSource == "外部销售") {
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                console.log('外部销售');
+                this.optionForm.column.forEach(its => {
+                    if (its.prop == 'customerId') {
+                        this.$set(its, 'disabled', true)
+                    }
+                })
+                //不能录入不能删除
+                this.$set(this.optionContactsBack, "addBtn", false)
+                this.isDisabled = true
+                this.$set(this.form, 'shipType', '物流')
+                this.$set(this.form, 'receivableType', '网络支付')
+                this.optionContactsBack.column.forEach(item => {
+                    this.$set(item, 'disabled', true)
+                    if (item.label == '批次号' || item.label == '备注') {
+                        item.disabled = false
+                    }
+                })
 
+                // this['optionContacts'] = this['optionContactsBack'];
+                // this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                // this.optionContactsBack.column.forEach(item => {
+                //     if (item.prop == 'dot') {
+                //         this.$set(item, disabled, false)
+                //     } else {
+                //         this.$set(item, disabled, true)
+                //     }
+                // })
+                loading.close()
             } else {
-                this.$refs["form"].validate((valid, done) => {
-                    done();
-                    if (valid) {
-                        const loading = this.$loading({
-                            lock: true,
-                            text: '加载中',
-                            spinner: 'el-icon-loading',
-                            background: 'rgba(255,255,255,0.7)'
-                        });
-                        generateShipTask(this.form).then(res => {
-                            this.$message.success("生成出库任务成功");
-                            loading.close();
-                        }).finally(() => {
-                            loading.close();
-                        });
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                this.$set(this.form, 'shipType', '物流')
+                this.$set(this.form, 'receivableType', '现金')
+                this.optionContactsBack.column.forEach(item => {
+                    this.$set(item, 'disabled', false)
+                })
+                this.optionContactsBack.column.forEach(item => {
+                    if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '商品描述') {
+                        item.disabled = true;
                     }
                 })
+                console.log(324324);
+                this['optionContacts'] = this['optionContactsBack'];
+                this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                loading.close()
             }
+            // this.$set(this.form.orderItemsList,'goodsNum',66)
+        },
+        generateOutbound() {
+            if (this.buttonText === '生成任务') {
+                // 将按钮文本更改为"撤销任务"
+                this.buttonText = '撤销任务';
+                // 将按钮颜色更改为对应的颜色
+                this.buttonColor = 'warning'; // 比如改为warning
+                //生成任务逻辑
+                if (this.form.orderItemsList.length <= 0) {
+                    this.$message.error('请录入明细');
+                } else {
+                    this.$refs["form"].validate((valid, done) => {
+                        done();
+                        if (valid) {
+                            const loading = this.$loading({
+                                lock: true,
+                                text: '加载中',
+                                spinner: 'el-icon-loading',
+                                background: 'rgba(255,255,255,0.7)'
+                            });
+                            generateShipTask(this.form).then(res => {
+                                this.$message.success("生成出库任务成功");
+                                loading.close();
+                            }).finally(() => {
+                                loading.close();
+                            });
+                        }
+                    })
+                }
+            }else{
+                // 将按钮文本更改为"生成任务"
+                this.buttonText = '生成任务';
+                // 将按钮颜色还原为success
+                this.buttonColor = 'success';
+            }
+
         },
         //联系人change
         contactsChange(e) {
@@ -723,6 +829,7 @@ export default {
                     }).then(res => {
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id)
+                        this.isDisabledTask = false
                         loading.close();
                     }).finally(() => {
                         loading.close();
@@ -742,12 +849,16 @@ export default {
             getDetails({ id: id }).then(res => {
                 console.log('res', res);
                 this.form = res.data.data
+                let ordForm = { srcBillNo: this.form.ordNo }
+                getList(1, 50, ordForm).then((res) => {
+                    this.dataList = res.data.data.records ? res.data.data.records : [];
+                })
                 if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核') {
                     console.log(1);
                     this.isApplySettlement = false;
                 }
 
-                if (this.form.status == '退款中' ) {
+                if (this.form.status == '退款中') {
                     console.log(2);
                     this.isConfirmRefundBtn = false;
                 }
@@ -771,50 +882,50 @@ export default {
                 })
                 loading.close();
 
-                if (this.form.businessSource == "外部销售") {
-                    console.log('外部销售');
-                    this.optionForm.column.forEach(its => {
-                        if (its.prop == 'customerId') {
-                            this.$set(its, 'disabled', true)
-                        }
-                    })
-                    //不能录入不能删除
-                    this.$set(this.optionContactsBack, "addBtn", false)
-                    this.isDisabled = true
-                    this.$set(this.form, 'shipType', '物流')
-                    this.$set(this.form, 'receivableType', '网络支付')
-                    this.optionContactsBack.column.forEach(item => {
-                        this.$set(item, 'disabled', true)
-                        if (item.label == '批次号' || item.label == '备注') {
-                            item.disabled = false
-                        }
-                    })
-                    this['optionContacts'] = this['optionContactsBack'];
-                    this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
-                    this.optionContactsBack.column.forEach(item => {
-                        if (item.prop == 'dot') {
-                            this.$set(item, disabled, false)
-                        } else {
-                            this.$set(item, disabled, true)
-                        }
-                    })
+                // if (this.form.businessSource == "外部销售") {
+                //     console.log('外部销售');
+                //     this.optionForm.column.forEach(its => {
+                //         if (its.prop == 'customerId') {
+                //             this.$set(its, 'disabled', true)
+                //         }
+                //     })
+                //     //不能录入不能删除
+                //     this.$set(this.optionContactsBack, "addBtn", false)
+                //     this.isDisabled = true
+                //     this.$set(this.form, 'shipType', '物流')
+                //     this.$set(this.form, 'receivableType', '网络支付')
+                //     this.optionContactsBack.column.forEach(item => {
+                //         this.$set(item, 'disabled', true)
+                //         if (item.label == '批次号' || item.label == '备注') {
+                //             item.disabled = false
+                //         }
+                //     })
+                //     this['optionContacts'] = this['optionContactsBack'];
+                //     this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                //     this.optionContactsBack.column.forEach(item => {
+                //         if (item.prop == 'dot') {
+                //             this.$set(item, disabled, false)
+                //         } else {
+                //             this.$set(item, disabled, true)
+                //         }
+                //     })
 
-                } else {
-                    this.$set(this.form, 'shipType', '物流')
-                    this.$set(this.form, 'receivableType', '现金')
-                    this.optionContactsBack.column.forEach(item => {
-                        this.$set(item, 'disabled', false)
-                    })
-                    this.optionContactsBack.column.forEach(item => {
-                        if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '商品描述') {
-                            item.disabled = true;
-                        }
-                    })
-                    console.log(324324);
-                    this['optionContacts'] = this['optionContactsBack'];
-                    this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
-                }
-                // this.$set(this.form.orderItemsList,'goodsNum',66)
+                // } else {
+                //     this.$set(this.form, 'shipType', '物流')
+                //     this.$set(this.form, 'receivableType', '现金')
+                //     this.optionContactsBack.column.forEach(item => {
+                //         this.$set(item, 'disabled', false)
+                //     })
+                //     this.optionContactsBack.column.forEach(item => {
+                //         if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '商品描述') {
+                //             item.disabled = true;
+                //         }
+                //     })
+                //     console.log(324324);
+                //     this['optionContacts'] = this['optionContactsBack'];
+                //     this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                // }
+                // // this.$set(this.form.orderItemsList,'goodsNum',66)
 
             }).catch(() => {
                 loading.close();

+ 16 - 1
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -24,6 +24,7 @@
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 3)">{{ row.srcOrdNo }}
           </span>
         </template>
+
       </avue-crud>
     </basic-container>
     <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
@@ -91,6 +92,13 @@ export default {
           label: "业务来源",
           prop: "businessSource",
           overHidden: true,
+          search: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=business_Source",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
         }, {
           label: '所属公司',
           prop: "salesCompanyName",
@@ -132,7 +140,14 @@ export default {
         }, {
           label: '状态',
           prop: "status",
+          search: true,
           overHidden: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=sales_Status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
         }, {
           label: '应结日期',
           prop: "dueDate",
@@ -246,7 +261,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        remove(form.id).then(res => {
+        remove({id:form.id}).then(res => {
           this.$message({
             type: 'success',
             message: '删除成功!'