Explorar el Código

Merge remote-tracking branch 'origin/dev' into dev

纪新园 hace 2 años
padre
commit
83042b828a

+ 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
+      }
+    ]
+  }
+  

+ 264 - 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,97 @@
               </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="row.priceOne" size="small" :controls="false" :precision="0"></el-input>
+              </template> -->
+              <template slot="priceOne" slot-scope="{row}">
+                <el-input-number v-model="row.priceOne" size="small" :controls="false" :precision="0"
+                   style="width: 100%" />
+              </template>
+              <template slot="priceTwo" slot-scope="{ row }">
+                <el-input v-model="row.priceTwo" size="small"></el-input>
+                <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+              </template>
+              <template slot="priceThree" slot-scope="{ row }">
+                <el-input v-model="row.priceThree" size="small"></el-input>
+                <!-- <span v-else>{{ row.refreshChange | IntegerFormat }}</span> -->
+              </template>
+              <template slot="priceFour" slot-scope="{ row }">
+                <el-input v-model="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" 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" 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 +134,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 +220,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 +352,7 @@ export default {
     }
   },
   activated() {
-    listAll().then(res=>{
+    listAll().then(res => {
       this.treeData = res.data.data
     })
     this.onLoad(this.page, this.search)
@@ -310,6 +391,12 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search)
     },
+    //刷新触发
+    refreshChangeCost() {
+      // this.treeDeptId = ''
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
     searchChange(params, done) {
       console.log(params);
       console.log(params.$salesCompanyName);
@@ -323,23 +410,64 @@ export default {
     selectionChange(list) {
       this.selectionList = list
     },
+    selectionChangeCost(list) {
+      this.goodsListSave = list
+      console.log(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 +515,87 @@ export default {
         this.onLoad(this.page, this.search)
       })
     },
+    // 确认导入
+    importGoods() {
+      console.log(this.goodsListSave);
+      if (this.goodsListSave.some(item => item.priceOne==undefined || item.priceTwo==undefined || item.priceThree==undefined || item.priceFour==undefined)) {
+        this.$message.error('请填写所有售价');
+      }else{
+        if (this.goodsListSave.length > 0) {
+        this.goodsListSaveHandle()
+      }
+      }
+     
+    },
+    goodsListSaveHandle() {
+      this.goodsListSave.forEach(item => {
+        item.sharedCompany?item.sharedCompany.join(','):''
+        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) {
@@ -423,6 +632,17 @@ export default {
         })
       }
     },
+    //新增搜索
+    goodsSearchCost(params, done) {
+      this.treeDeptId = ''
+      console.log(params);
+      params = {
+        ...params,
+        // artsVision: this.form.belongToCorpId
+      }
+      this.onLoad(this.page, params);
+      done()
+    },
     onLoad(page, params = {}) {
       console.log(this.search);
       params = {
@@ -436,6 +656,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 +664,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,

+ 44 - 10
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -150,7 +150,7 @@ export default {
                     {
                         label: "业务对象",
                         prop: "customerId",
-
+                        disabled:false,
                         type: 'select',
                         props: {
                             label: 'cname',
@@ -172,7 +172,7 @@ export default {
                         overHidden: true,
                         type: 'select',
                         dicUrl: "/api/blade-sales-part/storageDesc/listAll",
-   
+                        disabled:false,
                         props: {
                             label: 'cname',
                             value: 'id'
@@ -197,6 +197,7 @@ export default {
                         label: '库管',
                         prop: "stockClerkId",
                         type: 'select',
+                        disabled:false,
                         props: {
                             label: 'realName',
                             value: 'id'
@@ -213,7 +214,7 @@ export default {
                         prop: "goodsTotalNum",
                         search: false,
                         overHidden: true,
-                        disabled: true
+                        disabled:false,
                         // width: 120,
                         // rules: [
                         //     {
@@ -226,6 +227,7 @@ export default {
                     {
                         label: "业务日期",
                         prop: "createTime",
+                        disabled:false,
                         type: "datetime",
                         value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
                         format: "yyyy-MM-dd HH:mm",
@@ -240,15 +242,17 @@ export default {
                     },
                     {
                         label: "入库单号",
-                        prop: "ordNo",
-                        disabled: true
+                        prop: "billno",
+                        disabled:false,
                     },
                     {
                         label: "来源单号",
-                        prop: "srcOrdNo",
-                        disabled: true
+                        prop: "ordNo",
+                        disabled:false,
+
                     }, {
                         label: '备注',
+                        disabled:false,
                         prop: "remarks",
                         type: 'textarea',
                         span: 16,
@@ -569,12 +573,42 @@ export default {
         },
         //编辑
         confirmEditing(){
-            this.$set(this.optionForm,'disabled',false)
-            this.$set(this.optionContacts,'disabled',false)
             if(this.form.statusName == '待入库'){
+                this.$set(this.optionForm,'disabled',false)
+                this.$set(this.optionContacts,'disabled',false)
+                this.optionForm.column.forEach(item=>{
+                    if(item.prop == 'remarks' || item.prop == 'customerId' || item.prop == 'storageId' || item.prop == 'createTime' || item.prop == 'stockClerkId'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
                 this.optionContacts.column.forEach(item=>{
-                    if(item.prop == remarks){
+                    if(item.prop == 'remarks'){
                         item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
+            }else{
+                this.$set(this.optionForm,'disabled',false)
+                this.$set(this.optionContacts,'disabled',false)
+                this.optionForm.column.forEach(item=>{
+                    if(item.prop == 'remarks'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
+                this.optionContacts.column.forEach(item=>{
+                    if(item.prop == 'remarks'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
                     }
                 })
             }

+ 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,

+ 48 - 26
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -10,12 +10,12 @@
         <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small"
           v-if="!editButton" @click="confirmEditing">编辑
         </el-button>
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        </el-button>
         <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'"
           @click="revoke">撤销出库
         </el-button>
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer"
-          v-if="form.statusName !== '已出库'">保存数据
-        </el-button>
+
         <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
           v-if="form.statusName == '待出库' || form.statusName == '撤销出库'" @click="complete">出库完成
         </el-button>
@@ -95,10 +95,9 @@ export default {
         span: 8,
         column: [{
           label: '业务对象',
-          disabled: true,
+          disabled: false,
           prop: "customerId",
           type: 'select',
-          disabled:true,
           props: {
             label: 'cname',
             value: 'id'
@@ -112,8 +111,8 @@ export default {
         }, {
           label: '仓库',
           prop: "storageId",
+          disabled: false,
           type: 'select',
-          disabled:true,
           props: {
             label: 'cname',
             value: 'id'
@@ -128,7 +127,7 @@ export default {
           label: '库管',
           prop: "stockClerkId",
           type: 'select',
-          disabled:true,
+          disabled: false,
           props: {
             label: 'realName',
             value: 'id'
@@ -143,7 +142,7 @@ export default {
         {
           label: '业务日期',
           prop: "createTime",
-          disabled:true,
+          disabled: false,
           type: "datetime",
           value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
           format: "yyyy-MM-dd HH:mm",
@@ -158,9 +157,8 @@ export default {
         },
         {
           label: '入库单号',
-          disabled: true,
-          disabled:true,
-          prop: "ordNo",
+          disabled: false,
+          prop: "billno",
           rules: [
             {
               required: true,
@@ -171,15 +169,15 @@ export default {
         },
         {
           label: '来源单号',
-          disabled: true,
-          prop: "srcOrdNo",
-          disabled:true
+          disabled: false,
+          prop: "ordNo",
+          disabled: true
         },
         {
           label: '商品数量',
-          disabled: true,
+          disabled: false,
           prop: "goodsTotalNum",
-          disabled:true,
+          disabled: true,
 
           rules: [
             {
@@ -193,7 +191,7 @@ export default {
           label: '备注',
           prop: "remarks",
           type: 'textarea',
-          disabled:true,
+          disabled: false,
           span: 24,
           minRows: 2
         }]
@@ -216,7 +214,7 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         column: [{
-          label: '物料编码',
+          label: '商品编码',
           disabled: true,
           prop: 'goodsNo',
           width: 100
@@ -276,11 +274,12 @@ export default {
         }, {
           label: '出库数量',
           prop: 'goodsNum',
+          disabled:false,
           disabled: true,
         }, {
           label: '实际数量',
-          disabled: true,
-          prop: 'sendNum'
+          prop: 'sendNum',
+          disabled:false,
         }, {
           label: '备注',
           prop: 'remarks'
@@ -379,8 +378,11 @@ export default {
     this.optionOutboundRecords = await this.getColumnData(this.getColumnName(270.3), this.optionOutboundRecordsBack);
     this.key++
     if (this.onLoad.id && this.detailData.id) {
+      console.log(1);
       this.refresh(this.onLoad.id, true)
+      this.$set(this.optionForm, 'disabled', true)
     } else if (this.onLoad.id) {
+      console.log(2);
       this.refresh(this.onLoad.id, true)
     }
   },
@@ -477,6 +479,11 @@ export default {
         if (res.data.data.statusName == '已出库') {
           // this.$set(this.optionForm, 'disabled', true)
           this.isAddDisabled = true
+          this.optionContacts.column.forEach(item=>{
+            if(item.prop == 'sendNum'){
+              item.disabled = true
+            }
+          })
         }
         this.form = res.data.data
         loading.close();
@@ -519,13 +526,28 @@ export default {
     },
     //编辑
     confirmEditing() {
-      this.optionForm.column.forEach(item => {
-        if (item.prop == 'remarks') {
-          item.disabled = false
-        }
-      })
-      this.isAddDisabled = false
+      if (this.form.statusName == '待出库') {
+        this.$set(this.optionForm, 'disabled', false)
+        this.optionForm.column.forEach(item => {
+          if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
+            item.disabled = false
+          } else {
+            item.disabled = true
+          }
+        })
+        this.isAddDisabled = false
+      }else{
+        this.$set(this.optionForm, 'disabled', false)
+        this.optionForm.column.forEach(item => {
+          if (item.prop == 'remarks') {
+            item.disabled = false
+          } else {
+            item.disabled = true
+          }
+        })
+        this.isAddDisabled = false
 
+      }
     },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {

+ 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" :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>

+ 91 - 20
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>
 
@@ -28,6 +27,8 @@
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="confirmRefundBtn('确认')" :disabled="isConfirmRefundBtn">确认退款
                         </el-dropdown-item>
+                        <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="isRevocationRequest">撤销请核
+                        </el-dropdown-item>
                     </el-dropdown-menu>
                 </el-dropdown>
                 <el-dropdown style="line-height: 0">
@@ -39,8 +40,7 @@
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">请核进度
                         </el-dropdown-item>
-                        <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="isRevocationRequest">撤销请核
-                        </el-dropdown-item>
+
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
@@ -67,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)">编辑
@@ -129,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: [],
@@ -180,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
@@ -250,6 +272,7 @@ export default {
                     label: '联系人',
                     type: "select",
                     prop: "contacts",
+                    disabled:false,
                     props: {
                         label: 'address',
                         value: 'id'
@@ -390,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,
@@ -617,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
@@ -681,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: {
@@ -703,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
@@ -776,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) {
@@ -794,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();
+                        });
+                    }
+                })
             }
 
         },
@@ -851,12 +922,12 @@ export default {
             getDetails({ id: id }).then(res => {
                 console.log('res', res);
                 this.form = res.data.data
-                let ordForm = { srcBillNo: this.form.ordNo }
+                let ordForm = { srcBillNo: this.form.srcOrdNo }
                 let _this = this
                 getList(1, 50, ordForm).then((res) => {
                     this.dataList = res.data.data.records ? res.data.data.records : [];
                 })
-                if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核') {
+                if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核' && this.form.status !== '已退款') {
                     console.log(1);
                     this.isApplySettlement = false;
                 }
@@ -969,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"