web100 2 years ago
parent
commit
180b3919e5

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

@@ -49,4 +49,27 @@ export function remove(ids) {
       ids
     }
   })
+}
+// 新增列表
+export const groundingList = (params) => {
+  return request({
+    url: '/api/blade-sales-part/stockDesc/groundingList',
+    method: 'get',
+    params: params
+  })
+}
+//导入
+export function productLaunch(data) {
+  return request({
+    url: '/api/blade-sales-part/productLaunch/productLaunch',
+    method: 'post',
+    data
+  })
+}
+
+export function deptList() {
+  return request({
+    url: '/api/blade-system/dept/deptList',
+    method: 'get',
+  })
 }

+ 17 - 0
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -36,6 +36,13 @@ export const generateShipTask = (data) => {
     data: data
   })
 }
+export const revokeGenerateShipTask = (data) => {
+  return request({
+    url: '/api/blade-sales-part/order/revokeGenerateShipTask',
+    method: 'post',
+    data: data
+  })
+}
 
 export const tradingBox = (data) => {
   return request({
@@ -74,4 +81,14 @@ export const revokeCheckOrder = (data) => {
     method: 'post',
     data: data
   })
+}
+
+export const goodsListXs = (customId) => {
+  return request({
+    url: '/api/blade-sales-part/goodsDesc/goodsListXs',
+    method: 'get',
+    params:{
+      customId
+    }
+  })
 }

+ 1 - 1
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -181,7 +181,7 @@ export default {
                         }]
                     },
                     {
-                        label: "出厂编码",
+                        label: "商品编码",
                         prop: "code",
                         span: 8,
                         rules: [{

+ 1 - 1
src/views/tirePartsMall/basicData/commodityInformation/js/optionList.js

@@ -24,7 +24,7 @@ export const option = {
       overHidden: true,
     },
     {
-      label: "出厂编码",
+      label: "商品编码",
       prop: "code",
       overHidden: true,
       search: true

+ 130 - 0
src/views/tirePartsMall/basicData/listingManagement/commodity.json

@@ -0,0 +1,130 @@
+{
+    "align": "center",
+    "height": "auto",
+    "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": 8,
+    "searchMenuPosition": "right",
+    "border": true,
+    "index": true,
+    "selection": true,
+    "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": "brand",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "商品类别",
+        "prop": "goodsTypeName",
+        "hide": true,
+        "addDisabled": false,
+        "multiple": true,
+        "overHidden": true,
+        "rules": [{
+          "required": true,
+          "message": " ",
+          "trigger": "click"
+        }]
+      },
+      {
+        "label": "规格",
+        "prop": "typeno",
+        "search": false,
+        "overHidden": true
+      },
+     
+      {
+        "label": "花纹",
+        "prop": "brandItem",
+        "slot": true,
+        "overHidden": true
+      },
+      {
+        "label": "分类",
+        "prop": "categoryitem",
+        "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": "sharedCompany",
+        "slot": true,
+        "type":"select",
+        "cell":"true",
+        "overHidden": true
+      }
+    ]
+  }
+  

+ 240 - 30
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -4,20 +4,18 @@
       <el-row>
         <el-col :span="4">
           <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
-                     @save="corpTypeVisible = true">
+            @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"
-                     @row-del="rowDel"
-                     @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 273)"
-                     @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 273)" :page.sync="page">
+            ref="crud" :key="key" @on-load="onLoad" @selection-change="selectionChange" :before-open="beforeOpen"
+            @row-update="rowUpdate" @search-change="searchChange" @refresh-change="refreshChange" @row-del="rowDel"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 273)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 273)" :page.sync="page">
             <template slot="filesListForm">
               <c-upload :data="form.filesList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
-                        :enumerationValue="160"/>
+                :enumerationValue="160" />
             </template>
             <template slot="detailsTextForm">
               <avue-ueditor v-model="form.detailsText" :options="optionsUeditor"></avue-ueditor>
@@ -27,33 +25,94 @@
               </el-button>
               <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除
               </el-button>
-              <el-tooltip :content="`${row.upAndDownShelves == 0?'上架':'下架'}`" placement="top">
-                <el-switch
-                    style="margin-left: 10px"
-                    v-model="row.upAndDownShelves"
-                    @change="check(row)"
-                    :active-value="1"
-                    :inactive-value="0">
+              <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 type="primary" icon="el-icon-plus" size="small" @click="commoditySelection">新增
               </el-button>
               <el-button class="el-icon-bottom" type="warning" size="small" @click="excelBox = true">
                 导入
               </el-button>
+              <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>
             </template>
           </avue-crud>
         </el-col>
       </el-row>
     </basic-container>
+    <el-dialog title="导入上架" 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="closeGoods">
+      <el-row :style="{ height: rowHeight }">
+        <el-col :span="24">
+          <basic-container>
+            <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="cruds"
+              @refresh-change="refreshChangeCost" @selection-change="selectionChangeCost" @search-change="goodsSearchCost"
+              :page.sync="page" @on-load="onLoad">
+              <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="orderQuantity" slot-scope="{row}">
+                <el-input-number v-model="row.orderQuantity" size="small" :controls="false" :precision="0"
+                  @input="amountChange(row)" style="width: 100%" />
+              </template> -->
+              <template slot="priceOne" slot-scope="{ row }">
+                <el-input v-model.trim="row.priceOne" size="small"></el-input>
+                <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+              </template>
+              <template slot="priceTwo" slot-scope="{ row }">
+                <el-input v-model.trim="row.priceTwo" size="small"></el-input>
+                <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+              </template>
+              <template slot="priceThree" slot-scope="{ row }">
+                <el-input v-model.trim="row.priceThree" size="small"></el-input>
+                <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+              </template>
+              <template slot="priceFour" slot-scope="{ row }">
+                <el-input v-model.trim="row.priceFour" 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" 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" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+        <el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"
+          :disabled="tableData.length !== 1">导入</el-button>
+      </span>
+    </el-dialog>
     <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">
@@ -72,28 +131,42 @@
 <script>
 import {
   getList,
+  groundingList,
   submit,
   batchOperationProductLaunch,
   getDetail,
   listAll,
-  remove
+  remove,
+  productLaunch,
+  deptList
 } from "@/api/tirePartsMall/basicData/listingManagement/index.js";
-import {getToken} from "@/util/auth";
-
+import { getToken } from "@/util/auth";
+import commodity from "./commodity.json"
 export default {
   name: "index",
   data() {
     return {
+      data: [],
+      sharedCompanyoptions:[],
+      activeName: 'searchList',
+      dialogVisibles: false,
+      tableData: [],
+      //上架列表
+      goodsListShow: [],
+      // 商品列表暂存
+      goodsListSave: [],
+      goodsListPolicy: [],
       optionsUeditor: {
         //普通上传地址
         // action:'https://avuejs.com/imgupload',
         action: "/api/blade-resource/oss/endpoint/put-file",
-        headers: {"Blade-Auth": "Bearer " + getToken()},
+        headers: { "Blade-Auth": "Bearer " + getToken() },
         props: {
           res: "data",
           url: 'link'
         }
       },
+      optionTwo: commodity,
       excelForm: {},
       excelOption: {
         submitBtn: false,
@@ -144,6 +217,11 @@ export default {
         total: 0,
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
+      pageList: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       key: 0,
       option: {},
       optionList: {
@@ -271,7 +349,7 @@ export default {
     }
   },
   activated() {
-    listAll().then(res=>{
+    listAll().then(res => {
       this.treeData = res.data.data
     })
     this.onLoad(this.page, this.search)
@@ -323,23 +401,62 @@ export default {
     selectionChange(list) {
       this.selectionList = list
     },
+    selectionChangeCost(list) {
+      this.tableData = list
+    },
+    //新增
+    commoditySelection() {
+      this.dialogVisibles = !this.dialogVisibles
+      this.tableData = []
+      this.goodsListSave = [];
+    },
     //打开表单前
     beforeOpen(done, type) {
       // 查看和编辑逻辑
       if (['view', 'edit'].includes(type)) {
-        getDetail({id: this.form.id}).then(res => {
+        getDetail({ id: this.form.id }).then(res => {
           this.form = res.data.data
           done();
         })
       }
     },
-    rowDel(row,index){
+    // 标签页切换
+    tabHandle(data) {
+      console.log(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 {
+        this.goodsListSave.splice(row.$index, 1)
+      }
+    },
+    rowDel(row, index) {
       this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(()=>{
-        remove(row.id).then((res)=>{
+      }).then(() => {
+        remove(row.id).then((res) => {
           this.$message({
             type: 'success',
             message: '删除成功!'
@@ -387,6 +504,85 @@ export default {
         this.onLoad(this.page, this.search)
       })
     },
+    // 确认导入
+    importGoods() {
+      console.log(this.goodsListSave);
+      if (this.goodsListSave.some(item => item.priceOne == "" || item.priceTwo == "" || item.priceThree == "" || item.priceFour == "")) {
+        this.$message.error('请填写所有价格字段');
+        console.log('字段没填');
+      } 
+      if (this.goodsListSave.length > 0) {
+        this.goodsListSaveHandle()
+      }
+    },
+    goodsListSaveHandle() {
+      this.goodsListSave.forEach(item => {
+        this.goodsListSave.specificationAndModel = item.typeno
+        delete this.goodsListSave.typeno
+      })
+     
+      console.log(this.goodsListSave);
+      productLaunch(this.goodsListSave).then(res => {
+        console.log(res);
+        this.dialogVisibles = !this.dialogVisibles
+
+      })
+    },
+    //导入商品触发
+    importChoice() {
+      console.log(1);
+      return
+      // this.contactsData = this.contactsData.concat(this.tableData)
+      if (this.tableData.length === 1) {
+        this.goodsShowData[this.choiceIndexT].cname = this.tableData[0].cname
+        this.goodsShowData[this.choiceIndexT].code = this.tableData[0].code
+        this.goodsShowData[this.choiceIndexT].typeno = this.tableData[0].typeno
+        this.goodsShowData[this.choiceIndexT].itemType = this.tableData[0].typeno
+        this.goodsShowData[this.choiceIndexT].itemId = this.tableData[0].id
+        this.goodsShowData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
+        this.goodsShowData[this.choiceIndexT].integralMultiples = this.tableData[0].integralMultiples
+        this.goodsShowData[this.choiceIndexT].corpId = this.tableData[0].corpId
+        this.goodsShowData[this.choiceIndexT].corpName = this.tableData[0].corpName
+        this.quantityChange(this.goodsShowData[this.choiceIndexT])
+        selectGoodsNum({
+          goodsId: this.tableData[0].id,
+          itemType: this.tableData[0].typeno,
+          tradeType: 'GN',
+          warehouseId: this.form.storageId
+        }).then(res => {
+          if (res.data.data.length > 0) {
+            this.goodsShowData[this.choiceIndexT].storageQuantityList = res.data.data
+            this.goodsShowData[this.choiceIndexT].storageId = res.data.data[0].storageId
+            this.goodsShowData[this.choiceIndexT].storageName = res.data.data[0].storageName
+            this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data[0].surplusRouteQuantity
+            if (res.data.data[0].tenantId !== "681169") {
+              this.goodsShowData[this.choiceIndexT].purchaseAmount = res.data.data[0].stockPrice
+            }
+          }
+        })
+      }
+      this.dialogVisible = !this.dialogVisible
+      this.commodityData = false
+    },
+    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) {
@@ -436,6 +632,7 @@ export default {
       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();
         });
@@ -443,6 +640,19 @@ export default {
       }).finally(() => {
         this.loading = false
       })
+      this.loading = true
+      groundingList(params).then(res => {
+        this.goodsListShow = res.data.data.records
+        this.data = res.data.data.records;
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+      deptList().then(res=>{
+        console.log(res);
+        this.sharedCompanyoptions = res.data.data
+      })
     },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {

+ 1 - 1
src/views/tirePartsMall/inventory/index.vue

@@ -82,7 +82,7 @@ export default {
             },
         ],
         column: [{
-          label: '物料编号',
+          label: '商品编码',
           prop: "code",
           search: true,
           overHidden: true,

+ 2 - 2
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -242,12 +242,12 @@ export default {
                     },
                     {
                         label: "入库单号",
-                        prop: "ordNo",
+                        prop: "billno",
                         disabled:false,
                     },
                     {
                         label: "来源单号",
-                        prop: "srcOrdNo",
+                        prop: "ordNo",
                         disabled:false,
 
                     }, {

+ 1 - 1
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -7,7 +7,7 @@
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 270)" :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除</el-button>
+          <el-button :size="size" :type="type" :disabled="row.item >= 1" @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>

+ 3 - 3
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -11,9 +11,9 @@
           <!--<el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>-->
           <el-button type="text" size="small" @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' : '修改' }}
           </el-button>
-          <el-button :disabled="row.statusName === '已派工'" :size="size" :type="type"
+          <!-- <el-button :disabled="row.statusName === '已派工'" :size="size" :type="type"
             @click="$refs.crud.rowDel(row, index)">删除
-          </el-button>
+          </el-button> -->
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
@@ -141,7 +141,7 @@ export default {
           dicUrl: '/api/blade-sales-part/storageDesc/listAll',
         },
         //  {
-        //   label: '发货库管',
+        //   label: '库管',
         //   prop: "bsType",
         //   width: 100,
         //   overHidden: true,

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

@@ -158,7 +158,7 @@ export default {
         {
           label: '入库单号',
           disabled: false,
-          prop: "ordNo",
+          prop: "billno",
           rules: [
             {
               required: true,
@@ -170,7 +170,7 @@ export default {
         {
           label: '来源单号',
           disabled: false,
-          prop: "srcOrdNo",
+          prop: "ordNo",
           disabled: true
         },
         {
@@ -214,7 +214,7 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         column: [{
-          label: '物料编码',
+          label: '商品编码',
           disabled: true,
           prop: 'goodsNo',
           width: 100

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

@@ -18,7 +18,7 @@
           :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button  :size="size" :disabled="dataList.item > 1" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
+          <el-button  :size="size" :disabled="row.item >= 1" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>

+ 87 - 17
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -13,9 +13,8 @@
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     @click="editCustomer">保 存
                 </el-button>
-                <el-button class="el-button--small-yh" style="margin-left: 6px;"
-                    :type="buttonColor"
-                    size="small" v-if="form.generateTask !== '已生成'" :disabled="isDisabledTask" @click="generateOutbound">
+                <el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
+                    v-if="form.generateTask !== '已生成'" :disabled="isDisabledTask" @click="generateOutbound">
                     {{ buttonText }}
                 </el-button>
 
@@ -41,7 +40,7 @@
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">请核进度
                         </el-dropdown-item>
-                        
+
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
@@ -68,6 +67,17 @@
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                             </template>
+                            <template slot="goodsId" slot-scope="{ row, index }">
+                                <span  style="display:flex">
+                                    <el-select v-model="row.goodsId" placeholder="请选择" size="small" filterable
+                                        style="width:60%" >
+                                        <el-option v-for="item in goodsIdoptions" :key="item.id" :label="item.cname"
+                                            :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                    <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
+                                </span>
+                            </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="editBtn(row, index)">编辑
@@ -130,17 +140,20 @@
 
 <script>
 import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerInformation"
-import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, revokeCheckOrder } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, revokeCheckOrder, revokeGenerateShipTask,goodsListXs } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import reportDialog from "@/components/report-dialog/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
 import { getList } from "@/api/paymentManagement/paymentRecord"
+import TicketDistribution from "../../../oceanShipping/maritimeExport/components/ticketDistribution.vue";
 export default {
     name: "detailsPage",
     data() {
         return {
+            goodsIdoptions:[],
             dataList: [],
+            dicUrlWithCustomId: '',
             isDisabled: false,
             isDisabledTask: true,
             contactsOption: [],
@@ -181,9 +194,17 @@ export default {
                     change: (data) => {
                         console.log(this.$refs.form.DIC.customerId);
                         console.log('this.onLoad.id', this.onLoad.id);
+
+                        if (!this.form.id) {
+                            console.log(3);
+                            this.$set(this.optionContactsBack, "addBtn", true)
+                            // this['optionContacts'] = this['optionContactsBack'];
+                            // this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
+                        }
                         if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
                             getCustom({ id: data.value }).then(res => {
                                 console.log(res.data.data);
+                                this.dicUrlWithCustomId = res.data.data.id
                                 this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
                                 this.form.storageId = res.data.data.deliveryWarehouseId
                                 this.form.contacts = res.data.data.corpsAttnList[0].cname
@@ -251,6 +272,7 @@ export default {
                     label: '联系人',
                     type: "select",
                     prop: "contacts",
+                    disabled:false,
                     props: {
                         label: 'address',
                         value: 'id'
@@ -391,13 +413,15 @@ export default {
                     remote: true,
                     overHidden: true,
                     type: 'select',
-                    props: {
-                        label: 'cname',
-                        value: 'id'
-                    },
-                    dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
+                    // props: {
+                    //     label: 'cname',
+                    //     value: 'id'
+                    // },
+                    // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
+                    // dicUrl: /api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}
+                    // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
                 }, {
-                    label: '物料编码',
+                    label: '商品编码',
                     prop: 'goodsNo',
                     overHidden: true,
                     disabled: false,
@@ -618,6 +642,7 @@ export default {
     },
     async created() {
         this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
+
             if (this.formContacts.goodsId !== value) {
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
@@ -682,13 +707,30 @@ export default {
         }
         if (!this.form.id) {
             console.log(3);
-            this.$set(this.optionContacts, "addBtn", true)
+            this.$set(this.optionContactsBack, "addBtn", false)
             this['optionContacts'] = this['optionContactsBack'];
             this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
         }
-        if(!this.detailData.id){
-        this.form.businessSource = '内部销售'
-
+        if (!this.detailData.id) {
+            this.form.businessSource = '内部销售'
+        }
+        console.log('this.detailData.status', this.detailData.status);
+        if (this.detailData.status == 1) {
+            this.isExamineBtn = false;
+        }
+        goodsListXs(this.dicUrlWithCustomId).then(res=>{
+            console.log(res);
+            this.goodsIdoptions = res.data
+        })
+    },
+    watch:{
+        dicUrlWithCustomId(){
+            console.log(23432);
+            goodsListXs(this.dicUrlWithCustomId).then(res=>{
+            console.log(res);
+            this.goodsIdoptions = res.data
+        })
+            // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}`
         }
     },
     methods: {
@@ -704,6 +746,15 @@ export default {
         },
         //表头编辑
         confirmEditing() {
+            console.log(this.form);
+            if(this.form.status=='已取消'||this.form.status =='待发货'||this.form.status=='已发货'){
+                // this.optionForm.column.forEach(item=>{
+                //     if(item.prop= 'contacts'){
+                //         item.disabled = true
+                //     }
+                // })
+                return;
+            }
             this.$set(this.optionForm, 'disabled', false)
             this.$set(this.optionContactsBack, 'disabled', false)
             this.isDisabled = false
@@ -777,6 +828,8 @@ export default {
                 if (this.form.orderItemsList.length <= 0) {
                     this.$message.error('请录入明细');
                 } else {
+                    this.$set(this.optionForm, 'disabled', true)
+                    this.$set(this.optionContactsBack, 'disabled', true)
                     this.$refs["form"].validate((valid, done) => {
                         done();
                         if (valid) {
@@ -795,11 +848,28 @@ export default {
                         }
                     })
                 }
-            }else{
+            } else {
                 // 将按钮文本更改为"生成任务"
                 this.buttonText = '生成任务';
                 // 将按钮颜色还原为success
                 this.buttonColor = 'success';
+                this.$refs["form"].validate((valid, done) => {
+                    done();
+                    if (valid) {
+                        const loading = this.$loading({
+                            lock: true,
+                            text: '加载中',
+                            spinner: 'el-icon-loading',
+                            background: 'rgba(255,255,255,0.7)'
+                        });
+                        revokeGenerateShipTask(this.form).then(res => {
+                            this.$message.success("撤销出库成功");
+                            loading.close();
+                        }).finally(() => {
+                            loading.close();
+                        });
+                    }
+                })
             }
 
         },
@@ -970,7 +1040,7 @@ export default {
                         checkOrder({ ...data }).then((res) => {
                             loading.close();
                             this.$message.success('申请退款成功');
-                            console.log(res);
+                            this.isApplySettlement = !this.isApplySettlement
                         }).catch(() => { loading.close(); })
                     }
                 })

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

@@ -7,7 +7,7 @@
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 269)" :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除</el-button>
+          <el-button :size="size" :type="type" :disabled="row.status != '录入'" @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>

+ 1 - 1
src/views/wel/components/audit-data.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="home-container">
-    <el-card class="home-container__card">
+    <el-card class="home-container__card" >
       <div class="title">
         <span>
           审核数据

+ 35 - 0
src/views/wel/components/quick-launch.vue

@@ -36,6 +36,25 @@
           <span>收费</span>
         </div>
       </div>
+      <div class="content" v-if="sysType == 999">
+        <div class="content-icon" @click="inPage('xs')">
+          <i class="tradingIcon icon-sales" style="color:#57927a"></i>
+          <span>销售订单</span>
+        </div>
+        <div class="content-icon" @click="inPage('ck')">
+          <i class="tradingIcon icon-sales" style="color:#576892"></i>
+          <span>出库任务</span>
+        </div>
+        <div class="content-icon" @click="inPage('ckgd')">
+          <i class="tradingIcon icon-receipt" style="color:#57927a"></i>
+          <span>出库工单</span>
+        </div>
+        <div class="content-icon" @click="inPage('rk')">
+          <i class="tradingIcon icon-ship" style="color:#576892"></i>
+          <span>入库工单</span>
+        </div>
+      </div>
+
       <!-- <div class="content" v-if="sysType == 5">
         <div class="content-icon" @click="inPage('zy')">
           <i class="tradingIcon icon-pay" style="color:#57927a"></i>
@@ -174,6 +193,7 @@ export default {
     sysType: Number
   },
   created() {
+    console.log('sysType',this.sysType);
     //从缓存中获取所有路由信息
     let menu = JSON.parse(localStorage.getItem("saber-menuAll")).content
     for (let item of menu){
@@ -322,6 +342,21 @@ export default {
             this.$router.push("/dealer/purchase/index");
             break;
         }
+      }else if(this.sysType == 999){
+        switch(type){
+          case 'xs':
+            this.$router.push('/tirePartsMall/salesManagement/saleOrder/index');
+            break;
+            case 'ck':
+            this.$router.push('/tirePartsMall/salesManagement/outboundTask/index');
+            break;
+            case 'ckgd':
+            this.$router.push('/tirePartsMall/salesManagement/outboundWorkOrder/index');
+            break;
+            case 'rk':
+            this.$router.push('/tirePartsMall/purchasingManagement/warehouseEntryOrder/index');
+            break;
+        }
       }
     }
   }

+ 6 - 6
src/views/wel/home/defaultPage.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="container">
     <quick-launch class="item1" :sysType="sysType" />
-    <audit-data class="item2" :sysType="sysType"/>
-    <realtime-data class="item3" :sysType="sysType"/>
+    <audit-data class="item2" v-if="sysType !== 999" :sysType="sysType"/>
+    <realtime-data class="item3" v-if="sysType !== 999" :sysType="sysType"/>
     <sales-reached class="item4" :sysType="sysType" v-if="sysType!=4||roleName!='采购'"/>
     <sales-trend class="item5" :sysType="sysType" v-if="sysType!=4||roleName!='采购'"/>
-    <charge-today class="item6" :sysType="sysType" v-if="sysType!=4||roleName!='采购'"/>
-    <pay-today class="item7" :sysType="sysType" v-if="sysType!=4||roleName!='采购'"/>
+    <charge-today class="item6" :sysType="sysType" v-if="(sysType!=4||roleName!='采购')&&sysType !== 999"/>
+    <pay-today class="item7" :sysType="sysType" v-if="(sysType!=4||roleName!='采购')&&sysType !== 999"/>
   </div>
 </template>
 
@@ -69,9 +69,9 @@ export default {
 .container {
   display: grid;
   width: 100%;
-  height: 95.5vh;
+  // height: 95.5vh;
   grid-template-columns: repeat(auto-fill, 10%);
-  grid-template-rows: 140px 180px 180px 350px 140px;
+  // grid-template-rows: 140px 180px 180px 350px 140px;
   grid-template-areas:
     "a a a a a a a a a a"
     "b b b b b b b b b b"