Qukatie 1 год назад
Родитель
Сommit
3c654b0562
25 измененных файлов с 2801 добавлено и 705 удалено
  1. 10 4
      src/enums/column-name.js
  2. 14 1
      src/router/views/index.js
  3. 3 2
      src/views/basicData/commodityType/index.vue
  4. 2 0
      src/views/basicData/container/index.vue
  5. 8 1
      src/views/basicData/customerInformation/detailsPageEdit.vue
  6. 4 3
      src/views/basicData/customerInformation/index.vue
  7. 2 0
      src/views/basicData/customerManagement/companyMaterial/index.vue
  8. 2 0
      src/views/basicData/customerManagement/supplierMaterial/index.vue
  9. 451 460
      src/views/exportTrade/EcommerceStocking/detailsPage.vue
  10. 10 19
      src/views/exportTrade/customerInquiry/detailsPage.vue
  11. 18 7
      src/views/exportTrade/invoice/detailsPage.vue
  12. 10 0
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  13. 15 24
      src/views/exportTrade/salesContract/detailsPage.vue
  14. 3 55
      src/views/tirePartsMall/basicData/shareListing/commodity.json
  15. 55 98
      src/views/tirePartsMall/basicData/shareListing/index.vue
  16. 126 0
      src/views/tirePartsMall/basicData/shareListingNext/commodity.json
  17. 102 0
      src/views/tirePartsMall/basicData/shareListingNext/config/LTdetail.json
  18. 85 0
      src/views/tirePartsMall/basicData/shareListingNext/config/detail.json
  19. 194 0
      src/views/tirePartsMall/basicData/shareListingNext/detail.vue
  20. 587 0
      src/views/tirePartsMall/basicData/shareListingNext/index copy.vue
  21. 1006 0
      src/views/tirePartsMall/basicData/shareListingNext/index.vue
  22. 38 13
      src/views/tirePartsMall/basicData/sharedSales/detailsPage.vue
  23. 1 1
      src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue
  24. 36 12
      src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue
  25. 19 5
      src/views/tirePartsMall/salesManagement/saleOrder/index.vue

+ 10 - 4
src/enums/column-name.js

@@ -1212,7 +1212,7 @@ const columnName = [{
   name: '轮胎商城-基础资料-上架管理-列表列表'
 },{
   code: 273.1,
-  name: '轮胎商城-基础资料-共享上架-列表列表'
+  name: '轮胎商城-基础资料-共享管理-列表列表'
 },{
   code: 274,
   name: '轮胎商城-采购管理-入库工单-列表'
@@ -1937,10 +1937,10 @@ const columnName = [{
     name: '轮胎商城-库存管理-库间调拨明细(L)'
   },{
     code: 431,
-    name: '轮胎商城-商城管理-共享上架列表(L)'
+    name: '轮胎商城-商城管理-共享管理列表(L)'
   },{
     code: 432,
-    name: '轮胎商城-商城管理-共享上架选择产品列表(L)'
+    name: '轮胎商城-商城管理-共享管理选择产品列表(L)'
   },{
     code: 433,
     name: '轮胎商城-商城管理-共享销售列表(L)'
@@ -1953,7 +1953,13 @@ const columnName = [{
   },{
     code: 436,
     name: '轮胎商城-基础资料-客户管理-消费记录(L)'
-  }
+  },{
+    code: 437,
+    name: '轮胎商城-商城管理-次日达上架列表(L)'
+  },{
+    code: 438,
+    name: '轮胎商城-商城管理-次日达上架选择产品列表(L)'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 14 - 1
src/router/views/index.js

@@ -2763,13 +2763,26 @@ export default [{
   hidden: true,
   children: [{
     path: '/tirePartsMall/basicData/shareListing/index',
-    name: '共享上架',
+    name: '共享管理',
     meta: {
       i18n: '/tirePartsMall/basicData/shareListing/index',
       keepAlive: true,
     },
     component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/basicData/shareListing/index')
   }]
+},{
+  path: '/tirePartsMall/basicData/shareListingNext/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/basicData/shareListingNext/index',
+    name: '次日达上架',
+    meta: {
+      i18n: '/tirePartsMall/basicData/shareListingNext/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/basicData/shareListingNext/index')
+  }]
 },
 {
   path: '/tirePartsMall/basicData/sharedSales/index',

+ 3 - 2
src/views/basicData/commodityType/index.vue

@@ -18,11 +18,11 @@
                 <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
                 </el-button>
                 <el-button type="primary" size="small" v-if="isDisplayExport" icon="el-icon-top"
-                  @click="dataListExport">导出
+                  @click="dataListExport"  :disabled="!roleName.includes('admin')">导出
                 </el-button>
                 <el-button type="success" size="small" @click.stop="copyDoc()"
                   :disabled="selectionList.length != 1">复制单据</el-button>
-                <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true">批量修改分管员
+                <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true"  :disabled="!roleName.includes('admin')">批量修改分管员
                 </el-button>
               </template>
               <template slot-scope="scope" slot="menu">
@@ -154,6 +154,7 @@ export default {
       }
     };
     return {
+      roleName:localStorage.getItem("roleName"),
       excelLoading: false,
       excelAdminProfiles: false,
       excelAdminProfilesForm: {},

+ 2 - 0
src/views/basicData/container/index.vue

@@ -42,6 +42,7 @@
               size="small"
               type="primary"
               @click.stop="openReport()"
+               :disabled="!roleName.includes('admin')"
             >报表打印
             </el-button>
           </template>
@@ -63,6 +64,7 @@
   export default {
     data() {
       return {
+        roleName:localStorage.getItem("roleName"),
         switchDialog:false,//报表
         loading: true,
         data: [],

+ 8 - 1
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -759,7 +759,14 @@ export default {
           {
             label: "分管员",
             prop: "adminProfiles",
-            span: 8
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "区域",

+ 4 - 3
src/views/basicData/customerInformation/index.vue

@@ -22,11 +22,11 @@
               <template slot="menuLeft">
                 <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
                 </el-button>
-                <el-button icon="el-icon-printer" size="small" type="primary" @click.stop="openReport()">报表打印
+                <el-button icon="el-icon-printer" size="small" type="primary" @click.stop="openReport()" :disabled="!roleName.includes('admin')">报表打印
                 </el-button>
-                <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true">批量修改分管员
+                <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true" :disabled="!roleName.includes('admin')">批量修改分管员
                 </el-button>
-                <el-button type="primary" size="small" @click="handleExport" icon="el-icon-download">导出</el-button>
+                <el-button type="primary" size="small" @click="handleExport" icon="el-icon-download" :disabled="!roleName.includes('admin')">导出</el-button>
               </template>
               <template slot-scope="scope" slot="menu">
                 <el-button type="text" icon="el-icon-view" size="small" @click.stop="editOpen(scope.row, 1)">查看
@@ -103,6 +103,7 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      roleName:localStorage.getItem("roleName"),
       show: true,
       detailData: {},
       reportQuery: {},

+ 2 - 0
src/views/basicData/customerManagement/companyMaterial/index.vue

@@ -54,6 +54,7 @@
                   size="small"
                   type="primary"
                   @click.stop="openReport()"
+                  :disabled="!roleName.includes('admin')"
                   >报表打印
                 </el-button>
               </template>
@@ -152,6 +153,7 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      roleName:localStorage.getItem("roleName"),
       show: true,
       detailData: {},
       reportQuery: {},

+ 2 - 0
src/views/basicData/customerManagement/supplierMaterial/index.vue

@@ -54,6 +54,7 @@
                   size="small"
                   type="primary"
                   @click.stop="openReport()"
+                  :disabled="!roleName.includes('admin')"
                   >报表打印
                 </el-button>
               </template>
@@ -156,6 +157,7 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      roleName:localStorage.getItem("roleName"),
       show: true,
       detailData: {},
       reportQuery: {},

Разница между файлами не показана из-за своего большого размера
+ 451 - 460
src/views/exportTrade/EcommerceStocking/detailsPage.vue


+ 10 - 19
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -30,10 +30,10 @@
           <template slot="portOfDestination">
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
-          <!-- <template slot-scope="{}" slot="corpIdLabel">
+          <template slot-scope="{}" slot="corpIdLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('KH')">客户名称:</span>
           </template>
-          <template slot-scope="{}" slot="portOfLoadLabel">
+          <!-- <template slot-scope="{}" slot="portOfLoadLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('portOfLoad')">起运港:</span>
           </template>
           <template slot-scope="{}" slot="portOfDestinationLabel">
@@ -78,8 +78,8 @@
             </el-select>
           </template>
           <template slot="businesDate">
-            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
-              :disabled="detailData.status == 1" @change="businesDateChange">
+            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd 00:00:00" :disabled="detailData.status == 1" @change="businesDateChange">
             </el-date-picker>
           </template>
           <template slot="currency">
@@ -311,8 +311,8 @@
         deleteUrl="/blade-purchase-sales/orderfiles/update" display />
     </div>
     <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>
+      :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">
@@ -1056,18 +1056,9 @@ export default {
     },
     khEdit(staus) {
       if (staus == 'KH') {
-        if (this.form.corpId) {
-          this.$router.push({
-            path: '/basicData/customerInformation/index', query: {
-              corpId: this.form.corpId,
-              corpName: this.form.corpName
-            }
-          })
-        } else {
-          this.$router.push({
-            path: '/basicData/customerInformation/index',
-          })
-        }
+        this.$router.push({
+          path: '/basicData/customerInformation/index',
+        })
       } else if (staus == 'GS') {
         if (this.form.corpId) {
           this.$router.push({
@@ -1919,7 +1910,7 @@ export default {
       detail(id)
         .then(res => {
           if (this.detailData.status == "copy") {
-            console.log(11111,'copy')
+            console.log(11111, 'copy')
             delete res.data.data.id;
             delete res.data.data.sysNo;
             delete res.data.data.orderNo;

+ 18 - 7
src/views/exportTrade/invoice/detailsPage.vue

@@ -41,6 +41,9 @@
     <div class="customer-main">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot-scope="{}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('kh')">客户名称:</span>
+          </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" corpType="KH" disabled></crop-select>
           </template>
@@ -127,8 +130,8 @@
         deleteUrl="/blade-deliver-goods/deliveryfiles/update" display />
     </div>
     <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>
+      :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">
@@ -154,7 +157,8 @@
         <el-button type="primary" @click="importGoods" :disabled="selectionList.length == 0">导入</el-button>
       </span>
     </el-dialog>
-    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="跟单" @onClose="onClose()"></report-dialog>
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="跟单"
+      @onClose="onClose()"></report-dialog>
     <el-dialog title="选择日期" :visible.sync="dialog" v-if="dialog" width="30%" append-to-body>
       <span>
         <el-date-picker v-model="pickerValue" type="date" style="width: 100%;" size="small"
@@ -571,11 +575,18 @@ export default {
     }
   },
   methods: {
+    khEdit(staus) {
+      if (staus == 'kh') {
+        this.$router.push({
+          path: '/basicData/customerInformation/index',
+        })
+      }
+    },
     inShipped() {
-    if (!this.form.shipName) return this.$message.error("请输入船名")
-    if (!this.form.voyage) return this.$message.error("请输入航次")
-    if (!this.form.creditDate) return this.$message.error("请选择开船日期")
-    if (!this.form.dateOfArrival) return this.$message.error("请选择到港日期")
+      if (!this.form.shipName) return this.$message.error("请输入船名")
+      if (!this.form.voyage) return this.$message.error("请输入航次")
+      if (!this.form.creditDate) return this.$message.error("请选择开船日期")
+      if (!this.form.dateOfArrival) return this.$message.error("请选择到港日期")
       this.dialog = true
       this.fudaSatus = 2
     },

+ 10 - 0
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -23,6 +23,9 @@
     <div class="customer-main">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot-scope="{}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('kh')">客户名称:</span>
+          </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" corpType="KH"
               :disabled="detailData.status == 1 || form.ifEnquiry == '询价确认'"></crop-select>
@@ -417,6 +420,13 @@ export default {
     };
   },
   methods: {
+    khEdit(staus) {
+      if (staus == 'kh') {
+        this.$router.push({
+          path: '/basicData/customerInformation/index',
+        })
+      }
+    },
     cellStyle() {
       return "padding:0;height:40px;";
     },

+ 15 - 24
src/views/exportTrade/salesContract/detailsPage.vue

@@ -115,10 +115,10 @@
           <template slot="portOfDestination">
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
-          <!-- <template slot-scope="{}" slot="corpIdLabel">
+          <template slot-scope="{}" slot="corpIdLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('kh')">客户名称:</span>
           </template>
-          <template slot-scope="{}" slot="belongToCorpIdLabel">
+          <!-- <template slot-scope="{}" slot="belongToCorpIdLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('GS')">公司主体:</span>
           </template>
           <template slot-scope="{}" slot="portOfLoadLabel">
@@ -179,8 +179,8 @@
             </el-select>
           </template>
           <template slot="businesDate">
-            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
-              @change="businesDateChange" :disabled="detailData.status == 1">
+            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd 00:00:00" @change="businesDateChange" :disabled="detailData.status == 1">
             </el-date-picker>
           </template>
           <template slot="currency">
@@ -228,14 +228,15 @@
               placeholder="请输入 实际海运费" :disabled="detailData.status == 1" />
           </template>
           <template slot="orderNo">
-            <el-input size="mini" v-model="form.orderNo" oninput="this.value=this.value.toUpperCase()" placeholder="请输入 "
-              :disabled="detailData.status == 1" />
+            <el-input size="mini" v-model="form.orderNo" oninput="this.value=this.value.toUpperCase()"
+              placeholder="请输入 " :disabled="detailData.status == 1" />
             <!--:disabled="detailData.status == 1"-->
           </template>
         </avue-form>
       </trade-card>
       <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData" :orderFeesList.sync="orderFeesList"
-        @formGoodstoFees="formGoodstoFees" @backToList="getDetail" @oceanUSD="oceanUSD" @retrieve="retrieve"></goods-info>
+        @formGoodstoFees="formGoodstoFees" @backToList="getDetail" @oceanUSD="oceanUSD"
+        @retrieve="retrieve"></goods-info>
       <!--  <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel"
           @selection-change="goodsSelectionChange" @saveColumn="saveColumn" @resetColumn="resetColumn"
@@ -415,8 +416,8 @@
         </avue-crud>
       </trade-card> -->
       <fee-info ref="feeInfo" :tabShow="1" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
-        feeUrl="/blade-purchase-sales/orderfees/update" optionType="CK" itemType="销售" :showBtn="false" @beforeFinance="beforeFinance"
-        :inCropId="true" />
+        feeUrl="/blade-purchase-sales/orderfees/update" optionType="CK" itemType="销售" :showBtn="false"
+        @beforeFinance="beforeFinance" :inCropId="true" />
       <containerTitle title="合同附件"></containerTitle>
       <c-upload typeUpload="CK" :data="orderFilesList" :disabled="detailData.status == 1" :enumerationValue="76"
         deleteUrl="/blade-purchase-sales/orderfiles/update" display />
@@ -447,8 +448,8 @@
       </bill-application>
     </el-dialog>
     <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>
+      :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">
@@ -1428,19 +1429,9 @@ export default {
     },
     khEdit(staus) {
       if (staus == 'kh') {
-        if (this.form.corpId) {
-          this.$router.push({
-            path: '/basicData/customerInformation/index',
-            query: {
-              corpId: this.form.corpId,
-              corpName: this.form.corpName
-            }
-          })
-        } else {
-          this.$router.push({
-            path: '/basicData/customerInformation/index',
-          })
-        }
+        this.$router.push({
+          path: '/basicData/customerInformation/index',
+        })
       } else if (staus == 'GS') {
         if (this.form.corpId) {
           this.$router.push({

+ 3 - 55
src/views/tirePartsMall/basicData/shareListing/commodity.json

@@ -67,31 +67,11 @@
 
       },
       {
-        "label": "轮胎类别",
-        "prop": "goodsTypeId",
-        "addDisabled": false,
-        "search":true,
-        "type":"select",
-        "overHidden": true,
-        "props":{
-          "res":"data.records",
-          "label":"cname",
-          "value":"id"
-        },
-        "dicUrl":"/api/blade-sales-part/goodsType/page?corpType=SP&parentId=0",
-        "rules": [{
-          "required": true,
-          "message": " ",
-          "trigger": "click"
-        }]
-      },
-      {
         "label": "规格",
-        "prop": "typeno",
+        "prop": "specificationAndModel",
         "search": false,
         "overHidden": true
       },
-
       {
         "label": "花纹",
         "prop": "brandItem",
@@ -99,41 +79,9 @@
         "overHidden": true
       },
       {
-        "label": "售价1",
-        "prop": "priceOne",
-        "slot": true,
-        "cell":false,
-        "overHidden": true,
-        "rules": [{
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }]
-      },
-      {
-        "label": "售价2",
-        "prop": "priceTwo",
-        "slot": true,
-        "overHidden": true
-      },
-      {
-        "label": "售价3",
-        "prop": "priceThree",
-        "slot": true,
-        "overHidden": true
-      },
-      {
-        "label": "售价4",
-        "prop": "priceFour",
-        "slot": true,
-        "overHidden": true
-      },
-      {
-        "label": "共享公司",
-        "prop": "sharedCompany",
+        "label": "共享成本",
+        "prop": "shareCost",
         "slot": true,
-        "type":"select",
-        "cell":"true",
         "overHidden": true
       }
     ]

+ 55 - 98
src/views/tirePartsMall/basicData/shareListing/index.vue

@@ -52,17 +52,17 @@
                 按编码导入
               </el-button> -->
               <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
-                 size="small" @click="change(row, '1')">批量确认共享
+                size="small" @click="change(row, '1')">批量确认共享
               </el-button>
               <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger" size="small"
-                 @click="change(row, '2')">批量撤销共享
+                @click="change(row, '2')">批量撤销共享
               </el-button>
-              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
-                 size="small" @click="change(row, '3')">批量共享确认
-              </el-button>
-              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger"
-                 size="small" @click="change(row, '4')">批量共享撤销
+              <!-- <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
+                size="small" @click="change(row, '3')">批量共享确认
               </el-button>
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger" size="small"
+                @click="change(row, '4')">批量共享撤销
+              </el-button> -->
             </template>
           </avue-crud>
         </el-col>
@@ -110,6 +110,10 @@
               <el-input v-model="row.priceFour" size="small" @change="selectChangefun($event, row)"></el-input>
               <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
             </template>
+            <template slot="shareCost" slot-scope="{ row }">
+              <el-input v-model="row.shareCost" size="small"></el-input>
+              <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+            </template>
             <template slot="sharedCompany" slot-scope="{ row, index }">
               <span style="display:flex">
                 <el-select v-model="row.sharedCompany" multiple placeholder="请选择" size="small" filterable
@@ -261,7 +265,7 @@ export default {
       // 左侧搜索
       treeData: [],
       loading: false,
-      search: { billType: 0 },
+      search: {},
       form: {},
       dataList: [],
       selectionList: [],
@@ -318,18 +322,8 @@ export default {
           // remote:true, // 是否为远程搜索
           // dicUrl:'/api/blade-sales-part/productLaunch/list?brandItem={{key}}',   //key为当前输入值
           overHidden: true,
-        }, {
-          label: '公司',
-          prop: 'salesCompanyName',
-          disabled: true,
-          overHidden: true,
-          type: 'select',
-          props: {
-            label: 'fullName',
-            value: 'id'
-          },
-          dicUrl: '/api/blade-system/dept/top-list'
-        }, {
+        },
+        {
           label: '库存',
           prop: 'inventory',
           disabled: true,
@@ -373,48 +367,25 @@ export default {
           overHidden: false,
         },
         {
-          label: "售价1",
-          prop: "priceOne",
-          hide: false,
-          overHidden: true,
-        }, {
-          label: "售价2",
-          prop: "priceTwo",
-          hide: false,
-          overHidden: true,
-        }, {
-          label: "售价3",
-          prop: "priceThree",
-          hide: false,
-          overHidden: true,
-        }, {
-          label: "售价4",
-          prop: "priceFour",
+          label: "共享成本",
+          prop: "shareCost",
           hide: false,
           overHidden: true,
         },
         {
-          label: "共享成本",
-          prop: "shareCost",
-          hide: false,
+          label: "共享公司",
+          prop: "sharedCompany",
+          search: true,
           overHidden: true,
+          type: 'select',
+          filterable: true,
+          disabled: true,
+          props: {
+            label: 'deptName',
+            value: 'deptName'
+          },
+          dicUrl: '/api/blade-system/dept/deptListAll',
         },
-        // {
-        //   label: "共享公司",
-        //   prop: "sharedCompany",
-        //   // searchProp: "sharedCompanyList",
-        //   search: true,
-        //   overHidden: true,
-        //   // tags: true,
-        //   multiple: true,   //将可选变为多选
-        //   searchMultiple: false,
-        //   type: 'select',
-        //   props: {
-        //     label: 'fullName',
-        //     value: 'id'
-        //   },
-        //   dicUrl: '/api/blade-system/dept/deptList'
-        // },
         {
           label: "商品图片",
           prop: "filesList",
@@ -480,25 +451,13 @@ export default {
           overHidden: true,
         },
         {
-          label: "是否共享",
-          prop: "billType",
-          search: true,
-          showColumn: true,
-          span: 8,
-          type: 'select',
-          dicData: [{
-            label: '否',
-            value: 0
-          }, {
-            label: '是',
-            value: 1
-          }],
-        },
-        {
           label: "共享状态",
           prop: "shareStatus",
           search: true,
           showColumn: true,
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: false,
           span: 8,
           type: 'select',
           dicData: [{
@@ -515,15 +474,6 @@ export default {
       }
     }
   },
-  activated() {
-    // getCorpTypes().then(res=>{
-    //     this.treeData = res.data.data
-    // })
-    listAllP().then(res => {
-      this.treeData = res.data.data
-    })
-    this.onLoad(this.page, this.search)
-  },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(431), this.optionList);
     this.optionTwo = await this.getColumnData(
@@ -559,6 +509,9 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    listAllP().then(res => {
+      this.treeData = res.data.data
+    })
   },
   methods: {
     // 导入
@@ -837,8 +790,8 @@ export default {
       if (!this.goodsListSave.length) {
         this.$message.error('请选择')
       }
-      if (this.goodsListSave.some(item => item.priceOne == undefined || item.priceTwo == undefined || item.priceThree == undefined || item.priceFour == undefined)) {
-        this.$message.error('请填写所有售价');
+      if (this.goodsListSave.some(item => item.priceOne == undefined || item.priceTwo == undefined || item.priceThree == undefined || item.priceFour == undefined || item.shareCost == 0)) {
+        this.$message.error('请填写所有售价和共享成本');
       } else {
         if (this.goodsListSave.length > 0) {
           this.goodsListSaveHandle()
@@ -879,16 +832,24 @@ export default {
     change(row, type) {
       let data = []
       for (let item of this.selectionList) {
+        if (item.shareCost == 0 || item.shareCost == null) {
+          return this.$message.error("请维护共享成本单价");
+        }
         data.push(item.id)
       }
       if (type === "1") {
+        for (let item of this.selectionList) {
+          if (item.shareStatus != '暂存') {
+            return this.$message.error("选中数据已共享,请重新选择");
+          }
+        }
         this.$DialogForm.show({
           title: '选择共享公司',
           width: '30%',
           menuPosition: 'right',
           option: {
             submitText: '确认',
-            emptyText:'取消',
+            emptyText: '取消',
             span: 24,
             column: [{
               label: "共享公司",
@@ -915,21 +876,15 @@ export default {
           },
           callback: (res) => {
             res.done()
-            this.$confirm('是否确认共享?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              res.close()
-              batchConfirmSharing({
-                ids: data.join(","),
-                sharedCompany: res.data.sharedCompany
-              }).then(res => {
-                this.$message.success("操作成功");
-                this.sharedCompanyVisible = false
-                this.onLoad(this.page, this.search)
-              })
+            batchConfirmSharing({
+              ids: data.join(","),
+              sharedCompany: res.data.sharedCompany
+            }).then(res => {
+              this.$message.success("操作成功");
+              this.sharedCompanyVisible = false
+              this.onLoad(this.page, this.search)
             })
+            res.close()
           }
         })
         // for (let item of this.selectionList) {
@@ -939,7 +894,8 @@ export default {
         // this.sharedCompanyVisible = true
       } else if (type === "2") {
         for (let item of this.selectionList) {
-          if (item.billType != 0 || item.shareStatus == '暂存') return this.$message.error("商品为被共享商品,撤销失败");
+          if (item.shareStatus == '暂存') return this.$message.error("选中数据未共享,请重新选择");
+          if (item.billType != 0) return this.$message.error("商品为被共享商品,撤销失败");
         }
         this.$confirm('是否撤销共享?', '提示', {
           confirmButtonText: '确定',
@@ -1009,6 +965,7 @@ export default {
         ...params,
         current: page.currentPage,
         size: page.pageSize,
+        billType: 0,
         ...Object.assign(params, search),
       }
       this.loading = true

+ 126 - 0
src/views/tirePartsMall/basicData/shareListingNext/commodity.json

@@ -0,0 +1,126 @@
+
+{
+    "align": "center",
+    "height": "450",
+    "calcHeight": 80,
+    "stripe": true,
+    "tip": false,
+    "addBtn": false,
+    "searchShow": true,
+    "searchShowBtn": false,
+    "menu": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "delBtn": false,
+    "menuWidth": 80,
+    "searchSpan": 8,
+    "searchMenuSpan": 24,
+    "searchMenuPosition": "right",
+    "border": true,
+    "index": true,
+    "selection": true,
+  "rowKey": "id",
+
+    "dialogClickModal": false,
+    "column": [
+        {
+            "label": "轮胎名称",
+            "prop": "cname",
+            "slot": true,
+            "search": true,
+            "width": 100,
+            "overHidden": true,
+            "rules": [
+              {
+                "required": true,
+                "message": " ",
+                "trigger": "blur"
+              }
+            ]
+          },
+      {
+        "label": "轮胎编码",
+        "prop": "code",
+        "search": true,
+        "width": 100,
+        "overHidden": true,
+        "rules": [
+          {
+            "required": true,
+            "message": " ",
+            "trigger": "blur"
+          }
+        ]
+      },
+      {
+        "label": "品牌",
+        "prop": "brandId",
+        "slot": true,
+        "overHidden": true,
+        "search": true,
+        "type": "select",
+        "props": {
+          "label": "cname",
+          "value": "id"
+        },
+        "dicUrl": "/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1"
+
+      },
+      {
+        "label": "规格",
+        "prop": "specificationAndModel",
+        "search": false,
+        "overHidden": true
+      },
+      {
+        "label": "花纹",
+        "prop": "brandItem",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "售价1",
+        "prop": "priceOne",
+        "slot": true,
+        "cell":false,
+        "overHidden": true,
+        "rules": [{
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }]
+      },
+      {
+        "label": "售价2",
+        "prop": "priceTwo",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "售价3",
+        "prop": "priceThree",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "售价4",
+        "prop": "priceFour",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "共享成本",
+        "prop": "shareCost",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "共享公司",
+        "prop": "sharedCompany",
+        "slot": true,
+        "type":"select",
+        "cell":"true",
+        "overHidden": true
+      }
+    ]
+  }

+ 102 - 0
src/views/tirePartsMall/basicData/shareListingNext/config/LTdetail.json

@@ -0,0 +1,102 @@
+{
+    "searchShow": true,
+    "searchMenuSpan": 8,
+    "border": true,
+    "index": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "delBtn": false,
+    "addBtn": false,
+    "align": "center",
+    "menuWidth": "120",
+    "menu": false,
+    "showSummary": true,
+    "searchIcon": true,
+    "searchIndex": 2,
+    "selection": true,
+    "tip": false,
+    "expand": false,
+    "expandWidth": 38,
+    "sumColumnList": [
+        {
+            "name": "addQuantity",
+            "type": "sum"
+        },
+        {
+            "name": "subQuantity",
+            "type": "sum"
+        },
+        {
+            "name": "totalQuantity",
+            "type": "sum"
+        }
+    ],
+    "column": [
+        {
+            "label": "业务编号",
+            "prop": "billno",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        },
+        {
+            "label": "名称",
+            "prop": "corpName",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        },
+        {
+            "label": "状态",
+            "prop": "statusName",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "商品名称",
+            "prop": "goodsName",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "花纹",
+            "prop": "brandItem",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "规格",
+            "prop": "specificationAndModel",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "类型",
+            "prop": "bizTypeName",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "增加",
+            "prop": "addSendTotalNum",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "减少",
+            "prop": "subSendTotalNum",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "业务日期",
+            "prop": "updateTime",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        }
+    ]
+}

+ 85 - 0
src/views/tirePartsMall/basicData/shareListingNext/config/detail.json

@@ -0,0 +1,85 @@
+{
+    "searchShow": true,
+    "searchMenuSpan": 8,
+    "border": true,
+    "index": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "delBtn": false,
+    "addBtn": false,
+    "align": "center",
+    "menuWidth": "120",
+    "menu": false,
+    "showSummary": true,
+    "searchIcon": true,
+    "searchIndex": 2,
+    "selection": true,
+    "tip": false,
+    "expand": false,
+    "expandWidth": 38,
+    "sumColumnList": [
+        {
+            "name": "addQuantity",
+            "type": "sum"
+        },
+        {
+            "name": "subQuantity",
+            "type": "sum"
+        },
+        {
+            "name": "totalQuantity",
+            "type": "sum"
+        }
+    ],
+    "column": [
+        {
+            "label": "业务编号",
+            "prop": "billno",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        },
+        {
+            "label": "名称",
+            "prop": "corpName",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        },
+        {
+            "label": "状态",
+            "prop": "statusName",
+            "minWidth": 80,
+            "overHidden": true
+        },
+         
+        {
+            "label": "类型",
+            "prop": "bizTypeName",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "增加",
+            "prop": "addSendTotalNum",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "减少",
+            "prop": "subSendTotalNum",
+            "minWidth": 80,
+            "overHidden": true
+        },
+        {
+            "label": "业务日期",
+            "prop": "updateTime",
+            "search": false,
+            "minWidth": 80,
+            "overHidden": true,
+            "searchSpan": 8
+        }
+    ]
+}

+ 194 - 0
src/views/tirePartsMall/basicData/shareListingNext/detail.vue

@@ -0,0 +1,194 @@
+<template>
+  <basic-container>
+    <avue-crud ref="crud" :data="dataList" :option="option" v-model="form" :table-loading="loading">
+      <!-- <template slot="billno" slot-scope="{ row, index }">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(row, index)">{{ row.billno }}</span>
+      </template> -->
+    </avue-crud>
+  </basic-container>
+</template>
+  
+<script>
+import { productLaunchDetails } from "@/api/basicData/inventoryAccount";
+
+export default {
+  name: "detail",
+  data() {
+    return {
+      option: {
+        border: true,
+        align: 'center',
+        menuAlign: 'center',
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: '业务编号',
+            prop: 'billno',
+            overHidden: true,
+          }, {
+            label: '商品名称',
+            prop: 'goodsName',
+            overHidden: true,
+          }, {
+            label: '状态',
+            prop: 'statusName',
+            overHidden: true,
+          }, {
+            label: '类型',
+            prop: 'bizTypeName',
+            overHidden: true,
+          }, {
+            label: '增加',
+            prop: 'addSendTotalNum',
+            overHidden: true,
+          }, {
+            label: '减少',
+            prop: 'subSendTotalNum',
+            overHidden: true,
+          }
+        ]
+      },
+      dataList: [],
+      form: {},
+      page: {
+        pageSize: 10,
+        pagerCount: 1,
+        total: 0,
+      },
+      search: {},
+      loading: false,
+      params: null,
+    }
+  },
+  async created() {
+    this.params = {
+      goodsId: this.$route.query.goodsId,
+    }
+    this.onLoad()
+  },
+  methods: {
+    onLoad() {
+      this.loading = true;
+      productLaunchDetails(this.params).then(res => {
+        console.log(res)
+        this.dataList = res.data.data ? res.data.data : [];
+        this.option.height = window.innerHeight - 260;
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    // async saveColumn() {
+    //   const inSave = await this.saveColumnData(
+    //     this.getColumnName(279),
+    //     this.option
+    //   );
+    //   if (inSave) {
+    //     this.$message.success("保存成功");
+    //     //关闭窗口
+    //     this.$refs.crud.$refs.dialogColumn.columnBox = false;
+    //   }
+    // },
+    // async resetColumn() {
+    //   this.option = option;
+    //   const inSave = await this.delColumnData(
+    //     this.getColumnName(279),
+    //     option
+    //   );
+    //   if (inSave) {
+    //     this.$message.success("重置成功");
+    //     //关闭窗口
+    //     this.$refs.crud.$refs.dialogColumn.columnBox = false;
+    //   }
+    // },
+    // // 跳转
+    // beforeOpenPage(row, index) {
+    //   if (row.bizTypeName == '盘点') {
+    //     console.log(this.$store.getters, 139)
+    //     if (this.$store.getters.Inventory) {
+    //       this.$alert("明细账已存在,请保存关闭明细账再进行操作", "温馨提示", {
+    //         confirmButtonText: "确定",
+    //         type: "warning",
+    //         callback: action => {
+    //           console.log(action);
+    //         }
+    //       });
+    //     } else {
+    //       this.$router.$avueRouter.closeTag("/tirePartsMall/salesManagement/Inventory/index");
+    //       this.$router.push({
+    //         path: "/tirePartsMall/salesManagement/Inventory/index",
+    //         query: {
+    //           orderId: row.id
+    //         },
+    //       });
+    //     }
+    //   } else {
+    //     if (this.$store.getters.inboundAndOutbound) {
+    //       this.$alert("明细账已存在,请保存关闭明细账再进行操作", "温馨提示", {
+    //         confirmButtonText: "确定",
+    //         type: "warning",
+    //         callback: action => {
+    //           console.log(action);
+    //         }
+    //       });
+    //     } else {
+    //       if (row.bizTypeName == '出库') {
+    //         this.$router.$avueRouter.closeTag("/tirePartsMall/salesManagement/outboundWorkOrder/index");
+    //         this.$router.push({
+    //           path: "/tirePartsMall/salesManagement/outboundWorkOrder/index",
+    //           query: {
+    //             id: row.id
+    //           },
+    //         });
+    //       } else if (row.bizTypeName == '销售') {
+    //         this.$router.$avueRouter.closeTag("/salesOrder/index");
+    //         this.$router.push({
+    //           path: "/salesOrder/index",
+    //           query: {
+    //             orderId: row.id
+    //           },
+    //         });
+    //       } else if (row.bizTypeName == '采购') {
+    //         this.$router.$avueRouter.closeTag("/purchaseOrder/index");
+    //         this.$router.push({
+    //           path: "/purchaseOrder/index",
+    //           query: {
+    //             orderId: row.id
+    //           },
+    //         });
+    //       } else if (row.bizTypeName == '调出') {
+    //         if (this.$store.getters.Allocateandtransfer) {
+    //           this.$alert("调拨明细已存在,请保存关闭明细账再进行操作", "温馨提示", {
+    //             confirmButtonText: "确定",
+    //             type: "warning",
+    //             callback: action => {
+    //               console.log(action);
+    //             }
+    //           });
+    //         } else {
+    //           this.$router.$avueRouter.closeTag("/tirePartsMall/salesManagement/outboundWorkOrderL/index");
+    //           this.$router.push({
+    //             path: "/tirePartsMall/salesManagement/outboundWorkOrderL/index",
+    //             query: {
+    //               id: row.id
+    //             },
+    //           });
+    //         }
+    //       } else {
+    //         this.$router.$avueRouter.closeTag("/tirePartsMall/purchasingManagement/warehouseEntryOrder/index");
+    //         this.$router.push({
+    //           path: "/tirePartsMall/purchasingManagement/warehouseEntryOrder/index",
+    //           query: {
+    //             id: row.id
+    //           },
+    //         });
+    //       }
+    //     }
+    //   }
+    // },
+  },
+}
+</script>
+  
+<style scoped></style>
+  

+ 587 - 0
src/views/tirePartsMall/basicData/shareListingNext/index copy.vue

@@ -0,0 +1,587 @@
+<template>
+  <div>
+    <basic-container>
+      <el-row>
+        <el-col :span="4">
+          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
+                     @save="corpTypeVisible = true">
+          </avue-tree>
+        </el-col>
+        <el-col :span="20">
+          <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+                     ref="crud" :key="key" @on-load="onLoad" @selection-change="selectionChange"
+                     :before-open="beforeOpen"
+                     @row-update="rowUpdate" @search-change="searchChange" @refresh-change="refreshChange"
+                     @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 273.1)"
+                     @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 273.1)" :page.sync="page">
+            <template slot="filesListForm">
+              <span style="font-size: 12px;">(图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)</span>
+              <c-upload :data="form.filesList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
+                        :enumerationValue="160"/>
+            </template>
+            <template slot="detailsTextForm">
+              <avue-ueditor v-model="form.detailsText" :options="optionsUeditor"></avue-ueditor>
+            </template>
+            <template slot-scope="{type,size,row,index}" slot="menu">
+              <el-button :size="size" :type="type" :disabled="row.upAndDownShelves" @click="$refs.crud.rowEdit(row, index)">编辑
+              </el-button>
+                <!--<el-button :size="size" :type="type" :disabled="row.upAndDownShelves"-->
+                <!--           @click="annexOpen(row, index)">商城图片-->
+                <!--</el-button>-->
+              <el-tooltip :content="`${row.upAndDownShelves == 0?'上架':'下架'}`" placement="top">
+                <el-switch
+                    style="margin-left: 10px"
+                    v-model="row.upAndDownShelves"
+                    @change="check(row)"
+                    :active-value="1"
+                    :inactive-value="0">
+                </el-switch>
+              </el-tooltip>
+            </template>
+            <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
+                         size="small"
+                         @click="change(row, 'up')">批量上架
+              </el-button>
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger" size="small"
+                         @click="change(row, 'down')">批量下架
+              </el-button>
+              <!--<el-button class="el-icon-bottom" type="warning" size="small" @click="excelBox = true">-->
+              <!--  导入-->
+              <!--</el-button>-->
+            </template>
+          </avue-crud>
+        </el-col>
+      </el-row>
+    </basic-container>
+    <el-dialog title="添加产品" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="derivation">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+
+
+      <el-dialog
+          title="商城图片  (图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)"
+          :visible.sync="enclosure"
+          append-to-body
+          width="70%">
+          <c-upload :data="orderList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
+                    :enumerationValue="160" />
+          <span slot="footer" class="dialog-footer">
+          <el-button @click="enclosure = false" size="small">取 消</el-button>
+          <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
+        </span>
+      </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {
+  getList,
+  submit,
+  batchOperationProductLaunch,
+  getDetail, listAll
+} from "@/api/tirePartsMall/basicData/listingManagement/index.js";
+import {getToken} from "@/util/auth";
+import fa from "element-ui/src/locale/lang/fa";
+import {getCorpTypes} from "@/api/tirePartsMall/basicData/commodityInformation";
+
+export default {
+  name: "index",
+  data() {
+    return {
+        orderList:[],
+        enclosure:false,
+        dataId:0,
+        rowImg:[],
+
+      optionsUeditor: {
+        //普通上传地址
+        // action:'https://avuejs.com/imgupload',
+        action: "/api/blade-resource/oss/endpoint/put-file",
+        headers: {"Blade-Auth": "Bearer " + getToken()},
+        props: {
+          res: "data",
+          url: 'link'
+        }
+      },
+      excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-sales-part/productLaunch/import-productLaunch"
+          }
+        ]
+      },
+      treeOption: {
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "cname",
+          value: "id",
+        }
+      },
+      excelBox: false,
+      corpTypeVisible: false,
+      treeData: [],
+      loading: false,
+      search: {},
+      form: {},
+      dataList: [],
+      selectionList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key: 0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        updateBtnText:'保存',
+        selection: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 120,
+        updateBtnText:'保存',
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        column: [{
+          label: '商品名称',
+          prop: 'cname',
+          search: true,
+          disabled: true,
+          overHidden: true,
+        }, {
+          label: '规格型号',
+          prop: 'specificationAndModel',
+          search: true,
+          disabled: true,
+          overHidden: true,
+        },{
+          label: '花纹',
+          prop: 'brandItem',
+            search: true,  // 是否搜索
+          disabled: true,
+          overHidden: true,
+        }, {
+          label: '公司',
+          prop: 'salesCompanyId',
+          disabled: true,
+          overHidden: true,
+          type: 'select',
+          props: {
+            label: 'fullName',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-system/dept/top-list'
+        }, {
+          label: '库存',
+          prop: 'inventory',
+          disabled: true,
+          overHidden: true,
+        }, {
+          label: '产品状态',
+          prop: 'upAndDownShelves',
+          filterable: true,
+          display: false,
+          search: true,
+          hide: true,
+          disabled: true,
+          showColumn: false,
+          type: 'select',
+          dicData: [{
+            label: "上架",
+            value: 1
+          }, {
+            label: "下架",
+            value: 0
+          }]
+        },{
+            label: "品牌",
+            prop: "brandId",
+            search: true,
+            type: 'select',
+            props: {
+                label: 'cname',
+                value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1',
+            hide: true,
+            disabled: true,
+            overHidden: false,
+        },
+            {
+          label: "品牌",
+          prop: "brandName",
+          disabled: true,
+          overHidden: true,
+        }, {
+          label: "售价1",
+          prop: "priceOne",
+          hide: false,
+          showColumn: false,
+          overHidden: true,
+        }, {
+          label: "售价2",
+          prop: "priceTwo",
+          hide: false,
+          showColumn: false,
+          overHidden: true,
+        }, {
+          label: "售价3",
+          prop: "priceThree",
+          hide: false,
+          showColumn: false,
+          overHidden: true,
+        }, {
+          label: "售价4",
+          prop: "priceFour",
+          hide: false,
+          showColumn: false,
+          overHidden: true,
+        }, {
+          label: "共享成本",
+          prop: "shareCost",
+          overHidden: true,
+        }, {
+          label: "来源公司",
+          prop: "sourceCompanyId",
+            width:100,
+          // hide: true,
+          search: true,
+          showColumn: true,
+          overHidden: true,
+          disabled: true,
+          type: 'select',
+          props: {
+            label: 'fullName',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-system/dept/top-list'
+        },{
+            label: "防爆",
+            prop: "explosionProof",
+            search: true,
+            span: 8,
+            type: 'select',
+            dicData: [{
+                label: '否',
+                value: 0
+            }, {
+                label: '是',
+                value: 1
+            }],
+        }, {
+            label: "静音棉",
+            prop: "originalFactory",
+            search: true,
+            span: 8,
+            type: 'select',
+            dicData: [{
+                label: '否',
+                value: "0"
+            }, {
+                label: '是',
+                value: "1"
+            }],
+        },
+            {
+                label: "自修补",
+                prop: "selfRecovery",
+                search: true,
+                span: 8,
+                type: 'select',
+                dicData: [{
+                    label: '否',
+                    value: "0"
+                }, {
+                    label: '是',
+                    value: "1"
+                }],
+            }, {
+          label: "详情附件",
+          prop: "filesList",
+          hide: true,
+          showColumn: false,
+          overHidden: true,
+          span: 24,
+        }, {
+          label: "商品详情",
+          prop: "detailsText",
+          hide: true,
+          span: 24,
+          showColumn: false,
+          overHidden: true,
+        }]
+      }
+    }
+  },
+  activated() {
+    listAll().then(res=>{
+      this.treeData = res.data.data
+    })
+      // getCorpTypes().then(res=>{
+      //     this.treeData = res.data.data
+      // })
+    this.onLoad(this.page, this.search)
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(273.1), this.optionList);
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+      //打开附件
+      annexOpen(row, index) {
+          this.dataId = index
+          this.rowImg = row
+          this.orderList = row.filesList?row.filesList:[];
+          for (let order of this.orderList) {
+              order.paymentType = order.typeFiles
+          }
+          this.enclosure = true
+      },
+      // 附件保存
+      saveAnnex() {
+          if (this.orderList.length > 0) {
+              // 循环把编辑状态变成保存状态
+              this.orderList.map((item)=>{
+                  if (item.$cellEdit == true) {
+                      item.$cellEdit = false
+                  } else {
+                      item.$cellEdit = true
+                  }
+              })
+              let flag = this.orderList.some(item => {
+                  return item.$version == '主图'
+              })
+              if (!flag) {
+                  this.$message.warning('请选择主图')
+                  return
+              }
+          }
+          this.rowImg.filesList = this.orderList;
+          submit({
+              ...this.rowImg
+          }).then(res=>{
+              this.$message.success("添加成功")
+              // this.onLoad(this.page, this.search)
+          })
+          this.enclosure = false
+      },
+    derivation() {
+      window.open(
+        `/api/blade-sales-part/productLaunch/export-productLaunch?${this.website.tokenHeader
+        }=${getToken()}`
+      );
+    },
+    uploadAfter(res, done, loading, column) {
+      this.excelBox = false;
+      this.refreshChange();
+      done();
+    },
+    nodeClick(data) {
+      this.search.brandId = data.id
+      //   this.search.goodsTypeId = data.id
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.search);
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    searchChange(params, done) {
+        this.page.currentPage = 1;
+      done();
+      this.onLoad(this.page, params)
+    },
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    //打开表单前
+    beforeOpen(done, type) {
+      // 查看和编辑逻辑
+      if (['view', 'edit'].includes(type)) {
+        getDetail({id: this.form.id}).then(res => {
+          this.form = res.data.data
+          done();
+        })
+      }
+    },
+    //编辑确定
+    rowUpdate(form, index, done, loading) {
+      if (this.form.filesList.length > 0) {
+        let flag = this.form.filesList.some(item => {
+          return item.$version == '主图'
+        })
+        if (!flag) {
+          this.$message.warning('请选择主图')
+            loading()
+          return
+        }
+      }
+      submit({
+        ...this.form
+      }).then(res => {
+        this.$message.success("修改成功")
+        this.onLoad(this.page, this.search)
+        done()
+      }).catch((err) => {
+        loading()
+      })
+      // submit({
+      //   ...form
+      // }).then(res => {
+      //   this.onLoad(this.page, this.search)
+      //   done()
+      // }).catch(() => {
+      //   loading()
+      // })
+    },
+    check(row) {
+      batchOperationProductLaunch({
+        flag: row.upAndDownShelves,
+        ids: row.id
+      }).then(res => {
+        this.onLoad(this.page, this.search)
+      })
+    },
+    change(row, type) {
+      let data = []
+      for (let item of this.selectionList) {
+        data.push(item.id)
+      }
+      if (type === "up") {
+        // for (let item of this.selectionList) {
+        //   if (!Number(item.salesPrice)) return this.$message.error("上架失败,商城价格不能为0")
+        // }
+        this.$confirm('是否确认全部上架?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          batchOperationProductLaunch({
+            flag: 1,
+            ids: data.join(",")
+          }).then(res => {
+            this.onLoad(this.page, this.search)
+          })
+        })
+      } else if (type === "down") {
+        this.$confirm('是否确认全部下架?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          batchOperationProductLaunch({
+            flag: 0,
+            ids: data.join(",")
+          }).then(res => {
+            this.onLoad(this.page, this.search)
+          })
+        })
+      }
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        ...Object.assign(params, this.search),
+        billType: 1
+      }
+      this.loading = true
+      getList(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+      }
+    }
+  }
+}
+</script>
+
+<style scoped></style>

+ 1006 - 0
src/views/tirePartsMall/basicData/shareListingNext/index.vue

@@ -0,0 +1,1006 @@
+<template>
+  <div>
+    <basic-container>
+      <el-row>
+        <el-col :span="4">
+          <avue-tree ref="treeRef" :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;">
+          </avue-tree>
+        </el-col>
+        <el-col :span="20">
+          <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+            ref="crud" :key="key" @on-load="onLoad" @selection-change="selectionChange" :before-open="beforeOpen"
+            @row-update="rowUpdate" @search-change="searchChange" @search-reset="resetChange"
+            @refresh-change="refreshChange" @row-del="rowDel"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 437)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 437)" :page.sync="page">
+            <template slot="filesListForm">
+              <span style="font-size: 12px;">(图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)</span>
+              <c-upload :data="form.filesList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
+                :enumerationValue="160" />
+            </template>
+
+            <template slot="detailsTextForm">
+              <avue-ueditor v-model="form.detailsText" :options="optionsUeditor">
+              </avue-ueditor>
+            </template>
+            <!-- <template slot-scope="{ row, index }" slot="inventory">
+              <span style="color: #409EFF;cursor: pointer" @click.stop="storeInventoryOpen(row)">{{ row.inventory }}
+              </span>
+            </template> -->
+            <template slot-scope="{type,size,row,index}" slot="menu">
+              <el-button :size="size" :type="type" :disabled="row.shareStatus != '暂存'"
+                @click="$refs.crud.rowEdit(row, index)">编辑
+              </el-button>
+              <el-button :size="size" :type="type" :disabled="row.shareStatus != '暂存'"
+                @click="annexOpen(row, index)">商城图片
+              </el-button>
+            </template>
+
+            <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出</el-button>
+              <!-- <el-button class="el-icon-bottom" type="warning" size="small" @click="excelBoxfun('code')">
+                按编码导入
+              </el-button> -->
+              <!-- <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
+                size="small" @click="change(row, '1')">批量确认共享
+              </el-button>
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger" size="small"
+                @click="change(row, '2')">批量撤销共享
+              </el-button> -->
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="primary"
+                size="small" @click="change(row, '3')">批量上架
+              </el-button>
+              <el-button class="el-icon-document-copy" :disabled="selectionList.length === 0" type="danger" size="small"
+                @click="change(row, '4')">批量下架
+              </el-button>
+            </template>
+          </avue-crud>
+        </el-col>
+      </el-row>
+    </basic-container>
+    <el-dialog title="选择产品" v-if="dialogVisibles" append-to-body class="el-dialogDeep" :visible.sync="dialogVisibles"
+      width="80%" :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false"
+      @close="dialogVisibles = false">
+      <el-row :style="{ height: rowHeight }">
+        <el-col :span="5">
+          <div>
+            <el-scrollbar>
+              <basic-container>
+                <avue-tree style="height: 60vh;overflow-y: auto" :option="treeOption" :data="treeData"
+                  @node-click="nodeClick" />
+              </basic-container>
+            </el-scrollbar>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <!-- <basic-container> -->
+          <avue-crud :search.sync="query" :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="cruds"
+            :reserve-selection="true" @refresh-change="refreshChangeCost" @selection-change="selectionChangeCost"
+            @search-change="goodsSearchCost" @search-reset="goodsresetChange" :page.sync="pages" @on-load="onLoad"
+            @saveColumn="saveGoodsColumn" @resetColumn="resetGoodsColumn">
+            <template slot="menuLeft">
+              <el-tabs v-model="activeName" @tab-click="tabHandle">
+                <el-tab-pane label="查询结果" name="searchList" />
+                <el-tab-pane label="已选定数据" name="importStaging" />
+              </el-tabs>
+            </template>
+            <template slot="priceOne" slot-scope="{row}">
+              <el-input v-model="row.priceOne" size="small" :controls="false" :precision="0" style="width: 100%"
+                @change="selectChangefun($event, row)" @focus="selectFocusfun(row)" />
+            </template>
+            <template slot="priceTwo" slot-scope="{ row }">
+              <el-input v-model="row.priceTwo" size="small" @change="selectChangefun($event, row)"></el-input>
+              <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+            </template>
+            <template slot="priceThree" slot-scope="{ row }">
+              <el-input v-model="row.priceThree" size="small" @change="selectChangefun($event, row)"></el-input>
+              <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+            </template>
+            <template slot="priceFour" slot-scope="{ row }">
+              <el-input v-model="row.priceFour" size="small" @change="selectChangefun($event, row)"></el-input>
+              <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+            </template>
+            <template slot="shareCost" slot-scope="{ row }">
+              <el-input v-model="row.shareCost" size="small"></el-input>
+              <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+            </template>
+            <template slot="sharedCompany" slot-scope="{ row, index }">
+              <span style="display:flex">
+                <el-select v-model="row.sharedCompany" multiple placeholder="请选择" size="small" filterable
+                  style="width:60%">
+                  <el-option v-for="item in sharedCompanyoptions" :key="item.id" :label="item.fullName"
+                    :value="item.id">
+                  </el-option>
+                </el-select>
+              </span>
+            </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>
+              <el-button type="text" icon="el-icon-delete" size="small"
+                @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+              </el-button>
+            </template>
+          </avue-crud>
+          <!-- </basic-container> -->
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibles = false" :loading="saveLoading">取 消</el-button>
+        <el-button type="primary" @click="importGoods" :loading="saveLoading">导入</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="添加产品" v-if="excelBox" append-to-body :visible.sync="excelBox" :close-on-click-modal="false"
+      width="555px">
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="derivation">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+    <el-dialog title="附件上传" append-to-body :visible.sync="enclosure" width="555px" :close-on-click-modal="false"
+      v-dialog-drag>
+      <el-upload class="upload-demo" drag style="text-align: center" ref="upload" :action="action" :headers="headers"
+        :on-success="onSuccess" :show-file-list="false" multiple>
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip" slot="tip">
+          如上传文件过大,请耐心等待上传成功
+        </div>
+      </el-upload>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getList,
+  groundingList,
+  submit,
+  batchOperationProductLaunch,
+  getDetail,
+  remove,
+  productLaunch,
+  deptList,
+  listAllP,
+  groundingListZero,
+  batchConfirmSharing,
+  batchRevokeSharing,
+  batchSharingConfirm,
+  batchSharingRevoke
+} from "@/api/tirePartsMall/basicData/shareListing/index.js";
+import { getToken } from "@/util/auth";
+import commodity from "./commodity.json"
+import { getCorpTypes } from "@/api/tirePartsMall/basicData/commodityInformation";
+import { isProcurement } from "@/api/basicData/configuration";
+export default {
+  name: "index",
+  data() {
+    return {
+      query: {},
+      action: "/api/blade-resource/oss/endpoint/put-file",
+      headers: { "Blade-Auth": "Bearer " + getToken() },
+      orderList: [],
+      enclosure: false,
+      dataId: 0,
+      rowImg: [],
+      data: [],
+      sharedCompanyoptions: [],
+      activeName: 'searchList',
+      dialogVisibles: false,
+      selectedNodes: [],// 存储选择节点的数组
+      tableData: [],
+      //上架列表
+      goodsListShow: [],
+      // 商品列表暂存
+      goodsListSave: [],
+      goodsListPolicy: [],
+      optionsUeditor: {
+        //普通上传地址
+        // action:'https://avuejs.com/imgupload',
+        action: "/api/blade-resource/oss/endpoint/put-file",
+        headers: { "Blade-Auth": "Bearer " + getToken() },
+        props: {
+          res: "data",
+          url: 'link'
+        }
+      },
+      optionTwo: commodity,
+      excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-sales-part/productLaunch/import-productLaunch"
+          }
+        ]
+      },
+      templateUrl: '/api/blade-sales-part/productLaunch/export-productLaunch',
+      treeOption: {
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "cname",
+          value: "id",
+        }
+      },
+      excelBox: false,
+      // 左侧搜索
+      treeData: [],
+      loading: false,
+      search: {},
+      form: {},
+      dataList: [],
+      selectionList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      pageList: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      key: 0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        selection: true,
+        height: "auto",
+        updateBtnText: '保存',
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 160,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "90%",
+        column: [{
+          label: '商品名称',
+          prop: 'goodsName',
+          search: true,
+          disabled: true,
+          overHidden: true,
+        }, {
+          label: '规格型号',
+          prop: 'specificationAndModel',
+          disabled: true,
+          search: true,
+          overHidden: true,
+        }, {
+          label: '花纹',
+          prop: 'brandItem',
+          disabled: true,
+          search: true,  // 是否搜索
+          // type: 'select',
+          // remote:true, // 是否为远程搜索
+          // dicUrl:'/api/blade-sales-part/productLaunch/list?brandItem={{key}}',   //key为当前输入值
+          overHidden: true,
+        },
+        {
+          label: '库存',
+          prop: 'inventory',
+          disabled: true,
+          overHidden: true,
+        },
+        {
+          label: "品牌",
+          prop: "brandId",
+          search: true,
+          type: 'select',
+          props: {
+            label: 'cname',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1',
+          hide: true,
+          filterable: true,
+          disabled: true,
+          overHidden: false,
+        }, {
+          label: "品牌",
+          prop: "brandName",
+          disabled: true,
+          overHidden: false,
+        },
+        {
+          label: "售价1",
+          prop: "priceOne",
+          hide: false,
+          overHidden: true,
+        }, {
+          label: "售价2",
+          prop: "priceTwo",
+          hide: false,
+          overHidden: true,
+        }, {
+          label: "售价3",
+          prop: "priceThree",
+          hide: false,
+          overHidden: true,
+        }, {
+          label: "售价4",
+          prop: "priceFour",
+          hide: false,
+          overHidden: true,
+        },
+        {
+          label: "共享成本",
+          prop: "shareCost",
+          hide: false,
+          overHidden: true,
+        },
+        {
+          label: "共享公司",
+          prop: "srcSalesCompanyName",
+          search: true,
+          overHidden: true,
+          type: 'select',
+          filterable: true,
+          disabled: true,
+          props: {
+            label: 'deptName',
+            value: 'deptName'
+          },
+          dicUrl: '/api/blade-system/dept/deptListAll',
+        },
+        {
+          label: "商品图片",
+          prop: "filesList",
+          hide: true,
+          showColumn: false,
+          overHidden: true,
+          span: 24,
+        }, {
+          label: "防爆",
+          prop: "explosionProof",
+          display: false,
+          search: true,
+          hide: false,
+          showColumn: true,
+          span: 8,
+          type: 'select',
+          dicData: [{
+            label: '否',
+            value: 0
+          }, {
+            label: '是',
+            value: 1
+          }],
+        }, {
+          label: "静音棉",
+          prop: "originalFactory",
+          display: false,
+          search: true,
+          hide: false,
+          showColumn: true,
+          span: 8,
+          type: 'select',
+          dicData: [{
+            label: '否',
+            value: "0"
+          }, {
+            label: '是',
+            value: "1"
+          }],
+        },
+        {
+          label: "自修补",
+          prop: "selfRecovery",
+          display: false,
+          search: true,
+          hide: false,
+          showColumn: true,
+          span: 8,
+          type: 'select',
+          dicData: [{
+            label: '否',
+            value: "0"
+          }, {
+            label: '是',
+            value: "1"
+          }],
+        }, {
+          label: "商品详情",
+          prop: "detailsText",
+          hide: true,
+          span: 24,
+          showColumn: false,
+          overHidden: true,
+        },
+        {
+          label: "共享状态",
+          prop: "shareStatus",
+          search: true,
+          showColumn: true,
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: false,
+          span: 8,
+          type: 'select',
+          dicData: [{
+            label: '暂存',
+            value: "暂存"
+          }, {
+            label: '已共享',
+            value: "已共享"
+          }, {
+            label: '已确认',
+            value: "已确认"
+          }],
+        }]
+      }
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(437), this.optionList);
+    this.optionTwo = await this.getColumnData(
+      this.getColumnName(438),
+      this.optionTwo
+    );
+    isProcurement({ "param": "whether.model" }).then(res => {
+      if (res.data.data == 1) {
+        this.findObject(this.option.column, "brandItem").label = '规格型号1'
+        this.findObject(this.optionTwo.column, "brandItem").label = '规格型号1'
+        this.findObject(this.optionTwo.column, "goodsName").label = '名称'
+        this.findObject(this.optionTwo.column, "code").label = '编码'
+        this.findObject(this.optionTwo.column, "goodsTypeId").label = '类别'
+        this.findObject(this.option.column, "explosionProof").search = false
+        this.findObject(this.option.column, "originalFactory").search = false
+        this.findObject(this.option.column, "selfRecovery").search = false
+        this.findObject(this.option.column, "explosionProof").hide = true
+        this.findObject(this.option.column, "originalFactory").hide = true
+        this.findObject(this.option.column, "selfRecovery").hide = true
+        this.findObject(this.option.column, "explosionProof").showColumn = false
+        this.findObject(this.option.column, "originalFactory").showColumn = false
+        this.findObject(this.option.column, "selfRecovery").showColumn = false
+      }
+    })
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    this.$refs.crud.dicInit()
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+    listAllP().then(res => {
+      this.treeData = res.data.data
+    })
+  },
+  methods: {
+    // 导入
+    excelBoxfun(name) {
+      if (name == '名称') {
+        this.findObject(this.excelOption.column, "excelFile").action = '/api/blade-sales-part/shareputonshelves/importShareProductLaunch'
+        this.templateUrl = '/api/blade-sales-part/shareputonshelves/exportShareProductLaunch'
+      }
+      // else if (name == 'code') {
+      //   this.findObject(this.excelOption.column, "excelFile").action = '/api/blade-sales-part/productLaunch/import-productLaunch-code'
+      //   this.templateUrl = '/api/blade-sales-part/productLaunch/export-productLaunch-code'
+      // }
+      this.excelBox = true
+    },
+    // 导出
+    outExport() {
+      let config = { params: { ...this.search, whetherIntegral: 0 } }
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-sales-part/shareputonshelves/exportShareProductLaunch',      //跳转目标窗口的地址
+        query: {
+          ...config.params,    //括号内是要传递给新窗口的参数
+          identification: this.url
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
+    // 商城图片上传
+    onSuccess(response, file, fileList) {
+      let version = '2'
+      if (this.form.filesList.length == 0) {
+        version = '0'
+      }
+
+      this.form.filesList.push({
+        fileName: response.data.originalName,
+        url: response.data.link,
+        sort: this.form.filesList.length,
+        version: version
+      })
+      submit({
+        ...this.form
+      }).then(res => {
+        this.$message.success("修改成功")
+        this.enclosure = false
+        this.onLoad(this.page, this.search)
+      })
+    },
+    selectFocusfun(row) {
+      console.log(row, 503)
+      console.log(this.$refs.cruds, 504)
+    },
+    selectChangefun(value, row) {
+      console.log(value, 506)
+      if (value && Number(value) > 0) {
+        this.$refs.cruds.toggleRowSelection(row, true);
+      } else {
+        this.$refs.cruds.toggleRowSelection(row, false);
+      }
+    },
+    //打开附件
+    annexOpen(row, index) {
+      this.dataId = index
+      this.rowImg = row
+      this.orderList = row.filesList ? row.filesList : [];
+      for (let order of this.orderList) {
+        order.paymentType = order.typeFiles
+      }
+      getDetail({ id: row.id }).then(res => {
+        this.form = res.data.data
+      })
+      this.enclosure = true
+    },
+    // 附件保存
+    saveAnnex() {
+      if (this.orderList.length > 0) {
+        // 循环把编辑状态变成保存状态
+        this.orderList.map((item) => {
+          if (item.$cellEdit == true) {
+            item.$cellEdit = false
+          } else {
+            item.$cellEdit = true
+          }
+        })
+        let flag = this.orderList.some(item => {
+          return item.$version == '主图'
+        })
+        if (!flag) {
+          this.$message.warning('请选择主图')
+          return
+        }
+      }
+      this.rowImg.filesList = this.orderList;
+      submit({
+        ...this.rowImg
+      }).then(res => {
+        this.$message.success("添加成功")
+        this.onLoad(this.page, this.search)
+      })
+      this.enclosure = false
+    },
+    derivation() {
+      window.open(
+        `${this.templateUrl}?${this.website.tokenHeader
+        }=${getToken()}`
+      );
+    },
+    uploadAfter(res, done, loading, column) {
+      this.excelBox = false;
+      done();
+      this.onLoad(this.page, this.search);
+    },
+    nodeClick(data) {
+      this.search.brandId = data.id
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.search);
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    //刷新触发
+    refreshChangeCost() {
+      // this.treeDeptId = ''
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      // sharedCompanyList
+      // this.search.sharedCompanyList = params.sharedCompany;
+      // Vue.delete(params, 'sharedCompany');
+      // Vue.delete(this.search, 'sharedCompany');
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params)
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    selectionChangeCost(list) {
+      // this.goodsListSave = list
+      this.tableData = list
+    },
+    //新增
+    commoditySelection() {
+      delete this.page.brandId
+      this.goodsListShow = []
+
+      this.dialogVisibles = !this.dialogVisibles
+      this.tableData = []
+      this.goodsListSave = [];
+    },
+    //打开表单前
+    beforeOpen(done, type) {
+      getDetail({ id: this.form.id }).then(res => {
+        this.form = res.data.data
+        done();
+      })
+    },
+    // 标签页切换
+    tabHandle(data) {
+      if (data.name == 'searchList') {
+        this.goodsListShow = this.data;
+        this.page.total = this.pageList.total
+      } else if (data.name == 'importStaging') {
+        this.goodsListShow = this.goodsListSave;
+        this.page.total = 0
+      }
+    },
+    removeStagList(row, index, type) {
+      if (type === 'policy') {
+        this.goodsListPolicy.splice(row.$index, 1)
+        if (this.goodsListPolicy.length == 0) {
+          this.customerBuyFree.selection = true
+          this.optionPolicy.selection = true
+          this.$set(this.customerBuyFree, 'menu', true)
+        }
+      } else if (type === 'policy_buyAndGive') {
+        this.buyAndGiveList.splice(row.$index, 1)
+        if (this.buyAndGiveList.length == 0) {
+          this.customerBuyFree.selection = true
+          this.optionPolicy.selection = true
+          this.$set(this.optionPolicy, 'menu', true)
+        }
+      } else {
+        console.log(row)
+        this.goodsListSave.splice(row.$index, 1)
+      }
+    },
+    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) {
+        let flag = this.form.filesList.some(item => {
+          return item.$version == '主图'
+        })
+        if (!flag) {
+          this.$message.warning('请选择主图')
+          // done()
+          loading()
+          return
+        }
+        // 循环把编辑状态变成保存状态
+        this.form.filesList.map((item) => {
+          if (item.$cellEdit == true) {
+            // this.$set(item, "$cellEdit", false);
+            item.$cellEdit = false
+          } else {
+            // this.$set(item, "$cellEdit", true);
+            item.$cellEdit = true
+          }
+        })
+      }
+      console.log({ ...this.form }.detailsText, 651)
+      submit({
+        ...this.form
+      }).then(res => {
+        this.$message.success("修改成功")
+        this.onLoad(this.page, this.search)
+        done()
+      }).catch((err) => {
+        loading()
+      })
+    },
+    resetChange() {
+
+      if (document.getElementsByClassName("is-current")[0]) {
+        let selected = document.getElementsByClassName("is-current")[0]
+        selected.classList.remove("is-current")
+      }
+    },
+    goodsresetChange() {
+      this.query = this.$options.data().query;
+    },
+    // 确认导入
+    importGoods() {
+      if (!this.goodsListSave.length) {
+        this.$message.error('请选择')
+      }
+      if (this.goodsListSave.some(item => item.priceOne == undefined || item.priceTwo == undefined || item.priceThree == undefined || item.priceFour == undefined || item.shareCost == 0)) {
+        this.$message.error('请填写所有售价和共享成本');
+      } else {
+        if (this.goodsListSave.length > 0) {
+          this.goodsListSaveHandle()
+        }
+      }
+
+    },
+    goodsListSaveHandle() {
+      this.goodsListSave.forEach(item => {
+        item.sharedCompany = item.sharedCompany ? item.sharedCompany.toString() : '';
+        this.goodsListSave.specificationAndModel = item.typeno
+        delete this.goodsListSave.typeno
+      })
+      productLaunch(this.goodsListSave).then(res => {
+        this.dialogVisibles = !this.dialogVisibles
+        this.onLoad(this.page, this.search)
+      })
+    },
+    importStagList(row, index, type) {
+      if (type === 'policy') {
+        this.goodsListPolicy.push(row);
+        if (this.goodsListPolicy.length > 0) {
+          this.customerBuyFree.selection = false
+          this.optionPolicy.selection = true
+          this.$set(this.customerBuyFree, 'menu', false)
+        }
+      } else if (type === 'policy_buyAndGive') {
+        this.buyAndGiveList.push(row);
+        if (this.buyAndGiveList.length > 0) {
+          this.customerBuyFree.selection = true
+          this.optionPolicy.selection = false
+          this.$set(this.optionPolicy, 'menu', false)
+        }
+      } else {
+        this.goodsListSave.push(row);
+      }
+    },
+    change(row, type) {
+      let data = []
+      for (let item of this.selectionList) {
+        if (item.shareCost == 0 || item.shareCost == null) {
+          return this.$message.error("请维护共享成本单价");
+        }
+        data.push(item.id)
+      }
+      if (type === "3") {
+        for (let item of this.selectionList) {
+          if (item.billType != 1 || item.shareStatus != '暂存') return this.$message.error("选中数据已上架");
+        }
+        this.$confirm('是否共享确认?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          batchSharingConfirm({
+            ids: data.join(",")
+          }).then(res => {
+            this.$message.success("操作成功");
+            this.onLoad(this.page, this.search)
+          })
+        })
+      } else if (type === "4") {
+        for (let item of this.selectionList) {
+          if (item.billType != 1 || item.shareStatus == '暂存') return this.$message.error("选中数据已下架");
+        }
+        this.$confirm('是否共享撤销?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          batchSharingRevoke({
+            ids: data.join(",")
+          }).then(res => {
+            this.$message.success("操作成功");
+            this.onLoad(this.page, this.search)
+          })
+        })
+      }
+    },
+    //新增搜索
+    goodsSearchCost(params, done) {
+      this.treeDeptId = ''
+      params = {
+        ...params,
+        // artsVision: this.form.belongToCorpId
+      }
+      this.onLoad(this.page, params);
+      done()
+    },
+    onLoad(page, params = {}) {
+      // 深拷贝一份防止弹出框的搜索参数和外面表格的搜索参数一样
+      let search = JSON.parse(JSON.stringify(this.search))
+      search.goodsName = params.goodsName
+
+      // this.search.cname = params.cname
+
+      // params.sharedCompany = params.$sharedCompany
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        billType: 1,
+        ...Object.assign(params, search),
+      }
+      this.loading = true
+      getList(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.pageList.total = res.data.data.total
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+      this.loading = true
+
+      groundingListZero(params).then(res => {
+        this.goodsListShow = res.data.data.records
+        this.data = res.data.data.records;
+        this.pages.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+      deptList().then(res => {
+        this.sharedCompanyoptions = res.data.data
+      })
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(438),
+        this.optionTwo
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.cruds.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.cruds.doLayout()
+        })
+      }
+    },
+    async resetGoodsColumn() {
+      this.optionTwo = commodity;
+      const inSave = await this.delColumnData(
+        this.getColumnName(438),
+        commodity
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.cruds.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        setTimeout(() => {
+          this.$refs.cruds.$refs.dialogColumn.columnBox = false;
+        }, 1000);
+      }
+    },
+    //点击可用库存打开
+    storeInventoryOpen(row) {
+      this.$router.push({
+        path: "/tirePartsMall/basicData/listingManagement/detail",
+        query: {
+          goodsId: row.goodsId,
+          dot: row.dot
+        },
+      });
+
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      isProcurement({ "param": "whether.model" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.option.column, "brandItem").label = '规格型号1'
+          this.findObject(this.optionTwo.column, "brandItem").label = '规格型号1'
+          this.findObject(this.optionTwo.column, "goodsName").label = '名称'
+          this.findObject(this.optionTwo.column, "code").label = '编码'
+          this.findObject(this.optionTwo.column, "goodsTypeId").label = '类别'
+          this.findObject(this.option.column, "explosionProof").search = false
+          this.findObject(this.option.column, "originalFactory").search = false
+          this.findObject(this.option.column, "selfRecovery").search = false
+        }
+      })
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      isProcurement({ "param": "whether.model" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.option.column, "brandItem").label = '规格型号1'
+          this.findObject(this.optionTwo.column, "brandItem").label = '规格型号1'
+          this.findObject(this.optionTwo.column, "goodsName").label = '名称'
+          this.findObject(this.optionTwo.column, "code").label = '编码'
+          this.findObject(this.optionTwo.column, "goodsTypeId").label = '类别'
+          this.findObject(this.option.column, "explosionProof").search = false
+          this.findObject(this.option.column, "originalFactory").search = false
+          this.findObject(this.option.column, "selfRecovery").search = false
+        }
+      })
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+      }
+    }
+  }
+}
+</script>
+
+<style scoped></style>

+ 38 - 13
src/views/tirePartsMall/basicData/sharedSales/detailsPage.vue

@@ -64,15 +64,21 @@
                                     :disabled="!form.id || editButton || form.status == '已发货'" icon="el-icon-bottom"
                                     @click="excelDialogfun('code')">按Code导入
                                 </el-button>
-                                <el-button type="primary" icon="el-icon-printer" size="small"
-                                    @click="handlePrint">打印</el-button>
-                                <el-button type="danger" plain size="small" @click="batchDelete"
-                                    :disabled="editButton || form.status == '已发货'">一键删除</el-button>
+                                <el-popover placement="top" width="400" trigger="click" @show="inventoryShow2()">
+                                    <avue-crud :data="inventoryList" :option="inventoryOption">
+                                    </avue-crud>
+                                    <el-button slot="reference" type="primary" plain size="small"
+                                        :disabled="selectionMultilist.length != 1">查看库存</el-button>
+                                </el-popover>
                                 <el-button type="primary" plain size="small"
                                     :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货'"
                                     @click="allClick('派发销售单')">派发销售单</el-button>
                                 <el-button type="danger" plain size="small" @click="allClick('撤销派发')"
                                     :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货'">撤销派发</el-button>
+                                <el-button type="primary" icon="el-icon-printer" size="small"
+                                    @click="handlePrint">打印</el-button>
+                                <el-button type="danger" plain size="small" @click="batchDelete"
+                                    :disabled="editButton || form.status == '已发货'">一键删除</el-button>
                             </template>
                             <template slot="goodsId" slot-scope="{ row }">
                                 {{ row.goodsName }}
@@ -107,12 +113,10 @@
                             </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button v-if="!row.$cellEdit" :size="size" :disabled="editButton || row.sendNum > 0"
-                                    :type="type" icon="el-icon-edit"
-                                    @click="rowCell(row, index)">编辑
+                                    :type="type" icon="el-icon-edit" @click="rowCell(row, index)">编辑
                                 </el-button>
                                 <el-button v-else :size="size" :disabled="editButton || row.sendNum > 0" :type="type"
-                                    icon="el-icon-plus"
-                                    @click="rowSave(row, index)">保存
+                                    icon="el-icon-plus" @click="rowSave(row, index)">保存
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="editButton || row.sendNum > 0"
                                     :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
@@ -321,10 +325,17 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: '来源公司',
+                        prop: 'srcSalesCompanyName',
+                        overHidden: true,
+
+                    },
+                    {
                         label: '商品名称',
                         prop: 'goodsName',
                         overHidden: true,
-                    }, {
+                    },
+                    {
                         label: '库存数量',
                         prop: 'inventory',
                         overHidden: true,
@@ -343,6 +354,7 @@ export default {
                     {
                         label: '商品名称',
                         prop: 'goodsName',
+                        width: 360,
                         overHidden: true,
                     },
                     {
@@ -592,7 +604,7 @@ export default {
                     label: '仓库',
                     prop: "storageId",
                     type: 'select',
-                    disabled: false,
+                    disabled: true,
                     placeholder: '仓库为空即为异地销售',
                     props: {
                         label: 'cname',
@@ -1248,8 +1260,21 @@ export default {
                 spinner: 'el-icon-loading',
                 background: 'rgba(255,255,255,0.7)'
             });
-            listAllByGoodsId({ goodsId: row.goodsId }).then(res => {
-                console.log(res.data.data)
+            listAllByGoodsId({ goodsCode: row.goodsNo }).then(res => {
+                this.inventoryList = res.data.data
+            }).finally(() => {
+                loading.close();
+            });
+        },
+        inventoryShow2() {
+            this.inventoryList = []
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            listAllByGoodsId({ goodsCode: this.selectionMultilist[0].goodsNo }).then(res => {
                 this.inventoryList = res.data.data
             }).finally(() => {
                 loading.close();
@@ -1478,7 +1503,7 @@ export default {
                 this.form = res.data.data
                 if (res.data.data.status != '已发货') {
                     this.optionForm.disabled = false
-                }else{
+                } else {
                     this.optionForm.disabled = true
                 }
             }).finally(() => {

+ 1 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -196,7 +196,7 @@ export default {
           ]
         },
         {
-          label: '库单号',
+          label: '库单号',
           disabled: false,
           prop: "billno",
           rules: [

+ 36 - 12
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -88,25 +88,29 @@
                             @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.6)"
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.6)">
                             <template slot-scope="{scope,row}" slot="menuLeft">
-                                <el-button type="primary" icon="el-icon-plus" size="small" :disabled="isAddBtn"
+                                <el-button type="primary" icon="el-icon-plus" size="small"
+                                    :disabled="isAddBtn || form.businessSource == '共享销售'"
                                     @click="rowAdd(row, 1)">添加商品</el-button>
-                                <el-button type="success" size="small" :disabled="isAddBtn" icon="el-icon-bottom"
+                                <el-button type="success" size="small"
+                                    :disabled="isAddBtn || form.businessSource == '共享销售'" icon="el-icon-bottom"
                                     @click="excelDialogfun('名称')">按名称导入
                                 </el-button>
-                                <el-button type="success" size="small" :disabled="isAddBtn" icon="el-icon-bottom"
+                                <el-button type="success" size="small"
+                                    :disabled="isAddBtn || form.businessSource == '共享销售'" icon="el-icon-bottom"
                                     @click="excelDialogfun('code')">按Code导入
                                 </el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                                 <el-button type="danger" plain size="small" @click="batchDelete"
-                                    :disabled="form.generateTask == '已生成' || form.businessSource == '外部销售'">一键删除</el-button>
+                                    :disabled="form.generateTask == '已生成' || form.businessSource == '外部销售' || form.businessSource == '共享销售'">一键删除</el-button>
                                 <el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
                                 <el-popover width="600" trigger="click">
                                     <avue-crud :data="inventoryData" :option="inventoryOption"></avue-crud>
                                     <el-button type="primary" plain size="small" slot="reference" @click="viewInventory"
                                         :disabled="selectionMultilist.length != 1">查看库存</el-button>
                                 </el-popover>
-                                <el-button type="primary" icon="el-icon-plus" size="small" :disabled="isAddBtn"
+                                <el-button type="primary" icon="el-icon-plus" size="small"
+                                    :disabled="isAddBtn || form.businessSource == '共享销售'"
                                     @click="rowAdd(row, 2)">无库存商品</el-button>
                                 <el-popover width="600" trigger="click">
                                     <avue-crud :data="inventoryData2" :option="inventoryOption2">
@@ -127,19 +131,22 @@
                             </template>
 
                             <template slot="goodsNum" slot-scope="{ row }">
-                                <el-input-number v-if="!mingxibaocun && form.businessSource != '外部销售'" size="small"
-                                    v-model="row.goodsNum" :precision="numberDecimal" :controls="false"
+                                <el-input-number
+                                    v-if="!mingxibaocun && (form.businessSource != '外部销售' && form.businessSource != '共享销售')"
+                                    size="small" v-model="row.goodsNum" :precision="numberDecimal" :controls="false"
                                     @blur="goodsNumblurfun(row)" style="width: 100%"></el-input-number>
                                 <span v-else>{{ row.goodsNum }}</span>
                             </template>
                             <template slot="price" slot-scope="{ row }">
-                                <el-input v-if="!mingxibaocun && form.businessSource != '外部销售'" size="small"
-                                    v-model="row.price" style="width: 100%"></el-input>
+                                <el-input
+                                    v-if="!mingxibaocun && (form.businessSource != '外部销售' && form.businessSource != '共享销售')"
+                                    size="small" v-model="row.price" style="width: 100%"></el-input>
                                 <span v-else>{{ row.price }}</span>
                             </template>
                             <template slot="dot" slot-scope="{ row }">
                                 <el-select v-if="!mingxibaocun" v-model="row.dot" filterable default-first-option
-                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)" size="small">
+                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)"
+                                    size="small">
                                     <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
                                         :value="item.dot"></el-option>
                                 </el-select>
@@ -258,7 +265,8 @@
                     <div>
                         <el-scrollbar>
                             <basic-container>
-                                <avue-tree  style="height: 60vh;overflow-y: auto" :option="treeOption" :data="treeDataGoods" @node-click="nodeClick" />
+                                <avue-tree style="height: 60vh;overflow-y: auto" :option="treeOption"
+                                    :data="treeDataGoods" @node-click="nodeClick" />
                             </basic-container>
                         </el-scrollbar>
                     </div>
@@ -785,6 +793,13 @@ export default {
                     prop: "returnsAmount",
                     disabled: true
                 }, {
+                    label: '出库日期',
+                    prop: "deliveryBusinesDate",
+                    disabled: true,
+                    type: "datetime",
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd HH:mm:ss"
+                }, {
                     label: '备注',
                     prop: "remarks",
                     type: 'textarea',
@@ -1935,7 +1950,16 @@ export default {
             }
             this.isDisabled = false
             this.isAdd = false
-            if (this.form.businessSource == "外部销售") {
+            if (this.form.businessSource == "共享销售") {
+                this.optionForm.column.forEach(its => {
+                    if (its.prop == 'customerName' || its.prop == 'businesDate' || its.prop == 'businessSource' || its.prop == 'returnsNumber' || its.prop == 'returnsAmount' || its.prop == 'srcOrdNo') {
+                        this.$set(its, 'disabled', true)
+                        this.isSaveBtn = false;
+                        this.isDisabledTask = false;
+                        this.viewDisabled = false;
+                    }
+                })
+            } else if (this.form.businessSource == "外部销售") {
                 this.optionForm.column.forEach(its => {
                     if (its.prop == 'contacts' || its.prop == 'phone' || its.prop == 'recAddress') {
                         this.$set(its, 'disabled', true)

+ 19 - 5
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -198,7 +198,7 @@ export default {
         size: "small",
         menuWidth: 50,
         searchSpan: 6,
-        searchMenuSpan: 24,
+        searchMenuSpan: 18,
         searchIcon: true,
         expand: true,
         expandWidth: 60,
@@ -215,8 +215,8 @@ export default {
           name: 'totalMoney',
           type: 'sum',
         }, {
-            name: 'returnsNumber',
-            type: 'sum',
+          name: 'returnsNumber',
+          type: 'sum',
         }],
         column: [{
           label: '销售单号',
@@ -259,8 +259,8 @@ export default {
           search: true,
           remote: true,
           overHidden: true,
-          cell:true,
-          width:140,
+          cell: true,
+          width: 140,
           // type: 'select',
           // filterable: true,
           // props: {
@@ -404,6 +404,20 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },
+        {
+          label: '出库日期',
+          prop: "deliveryBusinesDate",
+          searchProp: "deliveryBusinesDateList",
+          type: "date",
+          overHidden: true,
+          search: true,
+          width: 100,
+          unlinkPanels: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
           label: '收费日期',
           prop: "paymentDate",

Некоторые файлы не были показаны из-за большого количества измененных файлов