Browse Source

修改bug

web100 2 years ago
parent
commit
5790cdbc63
31 changed files with 604 additions and 201 deletions
  1. 7 0
      src/api/tirePartsMall/basicData/commodityInformation/index.js
  2. 10 1
      src/api/tirePartsMall/salesManagement/saleOrder.js
  3. 2 2
      src/components/bill/config/mainLists.json
  4. 1 0
      src/views/approveData/index.vue
  5. 15 10
      src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue
  6. 1 1
      src/views/tirePartsMall/basicData/accountManagement/index.vue
  7. 8 7
      src/views/tirePartsMall/basicData/brandPage/detailsPage.vue
  8. 6 3
      src/views/tirePartsMall/basicData/brandPage/index.vue
  9. 20 14
      src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue
  10. 1 0
      src/views/tirePartsMall/basicData/customerInformation/components/index.vue
  11. 4 4
      src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue
  12. 2 2
      src/views/tirePartsMall/basicData/customerInformation/index.vue
  13. 4 4
      src/views/tirePartsMall/basicData/customerInformation/js/optionList.js
  14. 17 4
      src/views/tirePartsMall/basicData/listingManagement/commodity.json
  15. 2 2
      src/views/tirePartsMall/basicData/listingManagement/index.vue
  16. 6 3
      src/views/tirePartsMall/basicData/supplier/index.vue
  17. 16 2
      src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue
  18. 15 1
      src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue
  19. 21 2
      src/views/tirePartsMall/inventory/detail.vue
  20. 2 2
      src/views/tirePartsMall/inventory/index.vue
  21. 30 8
      src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue
  22. 17 6
      src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue
  23. 4 2
      src/views/tirePartsMall/salesManagement/inboundTask/index.vue
  24. 10 2
      src/views/tirePartsMall/salesManagement/outboundTask/index.vue
  25. 53 18
      src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue
  26. 20 4
      src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue
  27. 136 26
      src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue
  28. 16 1
      src/views/tirePartsMall/salesManagement/purchaseOrder/index.vue
  29. 104 57
      src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue
  30. 44 3
      src/views/tirePartsMall/salesManagement/saleOrder/index.vue
  31. 10 10
      src/views/tirePartsMall/statisticAnalysis/supplierTransactions/js/optionList.js

+ 7 - 0
src/api/tirePartsMall/basicData/commodityInformation/index.js

@@ -74,3 +74,10 @@ export const disabled = (data) => {
     params: data
   })
 }
+
+export const getCorpTypes = () => {
+  return request({
+    url: '/api/blade-sales-part/goodsType/tree?corpType=SP',
+    method: 'get',
+  })
+}

+ 10 - 1
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -133,4 +133,13 @@ export const getGoodsInfo = (query) => {
     method: 'get',
     params: query
   })
-}
+}
+
+//查询轮胎列表
+export const goodsListAll = () => {
+  return request({
+    url: 'api/blade-sales-part/goodsDesc/goodsListAll?enableOrNot=1',
+    method: 'get',
+  })
+}
+///

+ 2 - 2
src/components/bill/config/mainLists.json

@@ -71,8 +71,8 @@
     },
     {
       "label": "业务日期",
-      "prop": "createTime",
-      "searchProp":"createTimeList",
+      "prop": "businesDate",
+      "searchProp":"businesDateList",
       "type": "date",
       "search":true,
       "searchRange": true,

+ 1 - 0
src/views/approveData/index.vue

@@ -144,6 +144,7 @@ export default {
         } else {
           this.option = option;
         }
+        console.log(this.option);
       }
       this.getWorkDicts("auditStatus").then(res => {
         this.findObject(this.option.column, "auditStatus").dicData =

+ 15 - 10
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -50,10 +50,10 @@ export default {
           prop: "accountType",
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=accountType",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          }
         }, {
           label: '开户银行',
           prop: "bankDeposit"
@@ -68,10 +68,10 @@ export default {
           prop: "corporateName",
           type: 'select',
           dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
-            props: {
-              label: "deptName",
-              value: "id"
-            }
+          props: {
+            label: "deptName",
+            value: "id"
+          }
         }, {
           label: '币别',
           prop: "currency",
@@ -80,7 +80,7 @@ export default {
           dicData: [
             {
               label: "CNY",
-              value:"CNY",
+              value: "CNY",
             },
             {
               label: "USD",
@@ -90,7 +90,7 @@ export default {
         }, {
           label: '账户余额',
           prop: "accountBalance",
-          disabled:true
+          disabled: true
         }, {
           label: '备注',
           prop: "remarks",
@@ -161,6 +161,11 @@ export default {
               message: this.form.id ? "修改成功!" : "新增成功!"
             });
             this.queryData(res.data.data.id);
+            let data = this.form
+            editenable({ id: res.data.data.id, enableOrNot: 1 }).then(res => {
+              this.$set(this.form, 'enableOrNot','1')
+              console.log(this.form);
+            })
           }).finally(() => {
             loading.close()
           });

+ 1 - 1
src/views/tirePartsMall/basicData/accountManagement/index.vue

@@ -8,7 +8,7 @@
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 265)" :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 :size="size" :type="type" :disabled="row.enableOrNot" @click="$refs.crud.rowDel(row, index)">删除
           </el-button>
         </template>
         <template slot="status" slot-scope="{row,index,disabled}">

+ 8 - 7
src/views/tirePartsMall/basicData/brandPage/detailsPage.vue

@@ -30,15 +30,16 @@
       <trade-card title="基础信息">
         <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
       </trade-card>
-      <trade-card title="附件信息">
+      <trade-card title="附件信息  (图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)">
         <c-upload
-            basic
-            :data="form.brandFilesList"
-            :disabled="disabled"
-            deleteUrl="/api/blade-sales-part/brandfiles/remove"
-            :enumerationValue="272.1"
-            display
+        basic
+        :data="form.brandFilesList"
+        :disabled="disabled"
+        deleteUrl="/api/blade-sales-part/brandfiles/remove"
+        :enumerationValue="272.1"
+        display
         />
+        <!-- <span style="font-size: 12px;">(图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)</span> -->
       </trade-card>
     </div>
   </div>

+ 6 - 3
src/views/tirePartsMall/basicData/brandPage/index.vue

@@ -17,10 +17,13 @@
           @saveColumn="saveColumnTwo('crud','option','optionList',272)"
           :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 :size="size" :type="type" @click="check(row)">查看</el-button> -->
+          <el-button :size="size" :type="type" :disabled="row.enableOrNot" @click="$refs.crud.rowDel(row,index)">删除
           </el-button>
         </template>
+        <template slot-scope="{ row, index }" slot="cname">
+              <span style="color: #409EFF;cursor: pointer" @click.stop="check(row)">{{ row.cname }}</span>
+            </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
@@ -71,7 +74,7 @@ export default {
         searchMenuPosition: "right",
         align: "center",
         size: "small",
-        menuWidth: 100,
+        menuWidth: 50,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,

+ 20 - 14
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -24,7 +24,7 @@
                 <avue-form ref="form" class="trading-form" v-model="form" :option="option" :key="key">
                     <template slot="goodsTypeId" slot-scope="{disabled}">
                         <div style="display:flex;">
-                            <avue-cascader :disabled="disabled" :emit-path="false"  check-strictly :show-all-levels="false"
+                            <avue-cascader :disabled="disabled" :emit-path="false" check-strictly :show-all-levels="false"
                                 v-model="form.goodsTypeId" placeholder="请选择产品分类" :dic="goodsTypeList"
                                 :props="props"></avue-cascader>
                             <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
@@ -41,8 +41,8 @@
                     </template>
                     <template slot="whether" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
-                        <el-switch v-model="form.whether" :disabled="disabled || isWhether" active-text="是" inactive-text="否"
-                            active-value="1" inactive-value="0" />
+                        <el-switch v-model="form.whether" :disabled="disabled || isWhether" active-text="是"
+                            inactive-text="否" active-value="1" inactive-value="0" />
                     </template>
                     <template slot="explosionProof" slot-scope="{disabled}">
                         <el-switch v-model="form.explosionProof" :disabled="disabled" active-text="是" inactive-text="否"
@@ -111,7 +111,7 @@ export default {
             loadingBtn: false,
             goodsTypeVisible: false,
             storageVisible: false,
-            isWhether:false,
+            isWhether: false,
             form: {},
             form2: {},
             form3: {},
@@ -120,7 +120,7 @@ export default {
             option: {
                 menuBtn: false,
                 labelWidth: 100,
-                disabled:false,
+                disabled: false,
                 column: [
                     {
                         label: "名称",
@@ -236,6 +236,12 @@ export default {
                             label: 'fullName',
                             value: 'id'
                         },
+                        display:false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }],
                         dicUrl: '/api/blade-system/dept/top-list'
                     },
                     {
@@ -541,12 +547,12 @@ export default {
             //   this.goodsTypeList = res.data.data;
             //   this.findObject(this.option2.column, "parentId").dicData = res.data.data;
             // });
-            getCorpType({ corpType: "SP" }).then(res=>{
+            getCorpType({ corpType: "SP" }).then(res => {
                 console.log(res);
                 this.goodsTypeList = res.data.data;
             })
             customerList({ corpType: "SP" }).then(res => {
-                console.log('kk',res);
+                console.log('kk', res);
                 // this.goodsTypeList = res.data.data.records;
                 this.findObject(this.option2.column, "parentId").dicData = res.data.data.records;
             });
@@ -598,17 +604,17 @@ export default {
         },
         disabled(val) {
             disabled({ id: this.form.id, enableOrNot: val }).then(res => {
-                
+
                 this.$message({
                     type: "success",
                     message: val ? '启用成功' : '禁用成功'
                 });
                 this.getDetail(this.detailData.id);
-                if(val == 0){
+                if (val == 0) {
                     console.log('禁用中');
                     this.option.disabled = false;
                     for (let item of this.option.column) {
-                        this.$set(item,'disabled',false)
+                        this.$set(item, 'disabled', false)
                     }
                 }
             })
@@ -661,7 +667,7 @@ export default {
                 if (this.form.modifiable == 0) {
                     console.log(this.form.modifiable, '0');
                     for (let item of this.option.column) {
-                        this.$set(item,'disabled',true)
+                        this.$set(item, 'disabled', true)
                     }
                     this.isWhether = true
                 } else if (this.form.modifiable == 1) {
@@ -671,9 +677,9 @@ export default {
                     }
                     this.isWhether = false
                 }
-                if(this.form.enableOrNot == 1){
+                if (this.form.enableOrNot == 1) {
                     for (let item of this.option.column) {
-                        this.$set(item,'disabled',false)
+                        this.$set(item, 'disabled', false)
                     }
                 }
                 this.key++
@@ -706,7 +712,7 @@ export default {
                         this.form = res.data.data;
                         // this.data = res.data.data.stockGoodsList;
                         this.filesList = res.data.data.goodsFilesList;
-                        this.getDetail(this.detailData.id);
+                        this.getDetail(res.data.data.id);
                         // setTimeout(() => {
                         //     this.backToList()
                         // }, 1000);

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

@@ -71,6 +71,7 @@ export default {
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
+      console.log('5555555555555555555555555555555555');
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",

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

@@ -12,7 +12,7 @@
             保存数据
           </el-button>
           <el-button class="el-button--small-yh"  size="small" v-if="form.id" @click="editEnable">
-            {{ form.enableOrNot ? '启用' : '禁用' }}
+            {{ form.enableOrNot ? '禁用' : '启用' }}
           </el-button>
         </div>
       </div>
@@ -80,7 +80,7 @@
         </avue-crud>
       </trade-card>
       <containerTitle title="上传附件"></containerTitle>
-      <c-upload v-loading="loadingBtn" typeUpload="CD" deleteUrl="/api/blade-client/corpsfiles/remove" :data="corpsFiles"
+      <c-upload v-loading="loadingBtn" typeUpload="CD" deleteUrl="/api/blade-sales-part/corpsfiles/remove" :data="corpsFiles"
         display :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
       <el-dialog title="设置客户分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%"
         append-to-body @closed="corpTypeClosed">
@@ -587,10 +587,10 @@ export default {
     // 启用或禁用
     editEnable() {
       let data = this.form
-      editenable({ id: data.id, enableOrNot: data.enableOrNot ? 1 : 0 }).then(res => {
+      editenable({ id: data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
         this.$message({
           type: "success",
-          message: data.enableOrNot ? "启用成功!" : "禁用成功!"
+          message: data.enableOrNot ? "禁用成功!" : "启用成功!"
         });
         this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
       })

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

@@ -39,8 +39,8 @@
               </el-date-picker>
             </template>
             <template slot-scope="{type,size, row, index }" slot="menu">
-              <el-button :size="size" :type="type" :disabled="!row.enableOrNot" @click="editOpen(row, 2)">编辑</el-button>
-              <el-button :size="size" :type="type" :disabled="!row.enableOrNot" @click.stop="rowDel(row)">删除</el-button>
+              <!-- <el-button :size="size" :type="type" :disabled="!row.enableOrNot" @click="editOpen(row, 2)">编辑</el-button> -->
+              <el-button :size="size" :type="type" :disabled="row.enableOrNot" @click.stop="rowDel(row)">删除</el-button>
             </template>
             <!-- <template slot="deliveryWarehouseName">
               <el-select v-model="search.deliveryWarehouseName" filterable clearable size="small" :disabled="disabled">

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

@@ -16,7 +16,7 @@ export const option = {
   viewBtn: false,
   editBtn: false,
   delBtn: false,
-  menuWidth: 100,
+  menuWidth: 50,
   searchIcon: true,
   searchIndex: 2,
   column: [
@@ -56,7 +56,7 @@ export const option = {
     },
     {
       label: "业务员",
-      prop: "salesmanName",
+      prop: "salesmanId",
       overHidden: true,
       type: 'select',
       props: {
@@ -90,10 +90,10 @@ export const option = {
       type: 'select',
       dicData: [{
         label: '启用',
-        value: 0
+        value: 1
       }, {
         label: '禁用',
-        value: 1
+        value: 0
       }]
     },
     {

+ 17 - 4
src/views/tirePartsMall/basicData/listingManagement/commodity.json

@@ -1,3 +1,4 @@
+
 {
     "align": "center",
     "height": "auto",
@@ -51,19 +52,31 @@
       },
       {
         "label": "品牌",
-        "prop": "brandName",
+        "prop": "brandId",
         "slot": true,
         "overHidden": true,
-        "search": true
+        "search": true,
+        "type": "select",
+        "props": {
+          "label": "cname",
+          "value": "id"
+        },
+        "dicUrl": "/api/blade-sales-part/brandDesc/listAll"
 
       },
       {
         "label": "轮胎类别",
-        "prop": "goodsTypeName",
+        "prop": "goodsTypeId",
         "addDisabled": false,
         "search":true,
-        "multiple": true,
+        "type":"select",
         "overHidden": true,
+        "props":{
+          "res":"data.records",
+          "label":"parentName",
+          "value":"parentId"
+        },
+        "dicUrl":"/api/blade-sales-part/goodsType/page?corpType=SP",
         "rules": [{
           "required": true,
           "message": " ",

+ 2 - 2
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -39,7 +39,7 @@
             </template>
 
             <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-              <el-button type="primary" icon="el-icon-plus" size="small" @click="commoditySelection">新增
+              <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">
                 导入
@@ -55,7 +55,7 @@
         </el-col>
       </el-row>
     </basic-container>
-    <el-dialog title="导入上架" append-to-body class="el-dialogDeep" :visible.sync="dialogVisibles" width="80%"
+    <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">

+ 6 - 3
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -19,10 +19,13 @@
             @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 262)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 262)" :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"
+              <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
+              <el-button  :size="size" :type="type" :disabled="row.enableOrNot"
                 @click="$refs.crud.rowDel(row, index)">删除</el-button>
             </template>
+            <template slot-scope="{ row, index }" slot="cname">
+              <span style="color: #409EFF;cursor: pointer" @click.stop="check(row)">{{ row.cname }}</span>
+            </template>
             <!-- <template slot="enableOrNot" slot-scope="{row,index,disabled}">
               <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.enableOrNot">
               </el-switch>
@@ -156,7 +159,7 @@ export default {
         Height: '50',
         searchMenuPosition: "right",
         size: "small",
-        menuWidth: 100,
+        menuWidth: 50,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,

+ 16 - 2
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -145,7 +145,7 @@ export default {
             label: "name",
             value: "name"
           },
-          dicUrl: "/api/blade-user/client/gainUser",
+          dicUrl: "/api/blade-user/financeList",
           filterable: true,
           rules: [{
             required: true,
@@ -242,6 +242,20 @@ export default {
             showColumn: false,
             cell: false
           }, {
+            label: '业务日期',
+            prop: "businesDate",
+            disabled: false,
+            type: "datetime",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }, {
             label: '备注',
             prop: 'remarks',
             cell: true
@@ -280,7 +294,7 @@ export default {
       this.$set(this.optionContactsBack, 'disabled', true)
       this.isSaveBtn = true
       this.isFinanceBtn = true
-      
+
       this.isMenu = true
     } else {
       this.isFinanceBtn = true

+ 15 - 1
src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue

@@ -138,7 +138,7 @@ export default {
             label: "name",
             value: "name"
           },
-          dicUrl: "/api/blade-user/client/gainUser",
+          dicUrl: "/api/blade-user/financeList",
           filterable: true,
           rules: [{
             required: true,
@@ -209,6 +209,20 @@ export default {
             prop: 'thisAmount',
             cell: true
           }, {
+            label: '业务日期',
+            prop: "businesDate",
+            disabled: false,
+            type: "datetime",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          },{
             label: '备注',
             prop: 'remarks',
             cell: true

+ 21 - 2
src/views/tirePartsMall/inventory/detail.vue

@@ -15,8 +15,8 @@
         @refresh-change="refreshChange"
         @on-load="onLoad"
       >
-        <template slot="orderNo" slot-scope="{ row, index }">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(row, index)">{{ row.orderNo }}</span>
+        <template slot="billno" slot-scope="{ row, index }">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(row, index)">{{ row.billno }}</span>
         </template>
       </avue-crud>
     </basic-container>
@@ -121,6 +121,25 @@
       },
       // 跳转
       beforeOpenPage(row,index) {
+        if(row.bizTypeName == '出库'){
+          this.$router.$avueRouter.closeTag("/tirePartsMall/salesManagement/outboundWorkOrder/index");
+          this.$router.push({
+            path: "/tirePartsMall/salesManagement/outboundWorkOrder/index",
+            query: {
+              id: row.id
+            },
+          });
+        }else{
+          this.$router.$avueRouter.closeTag("/tirePartsMall/purchasingManagement/warehouseEntryOrder/index");
+          this.$router.push({
+            path: "/tirePartsMall/purchasingManagement/warehouseEntryOrder/index",
+            query: {
+              id: row.id
+            },
+          });
+        }
+        console.log(row);
+        return
         if (this.$store.getters.domSaleStatus) {
           this.$alert("销售单存在,请保存关闭销售单再进行操作", "温馨提示", {
             confirmButtonText: "确定",

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

@@ -116,8 +116,8 @@ export default {
             overHidden: true,
           }, {
             label: '品牌',
-            prop: "brandName",
-            searchProp: "brandId",
+            prop: "brandId",
+            // searchProp: "brandId",
             search: true,
             overHidden: true,
             type: 'select',

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

@@ -219,7 +219,7 @@ export default {
                         }]
                     },
                     {
-                        label: "轮胎数量",
+                        label: "订单数量",
                         prop: "goodsTotalNum",
                         search: false,
                         overHidden: true,
@@ -234,6 +234,14 @@ export default {
                         // ]
                     },
                     {
+                        label: "入库数量",
+                        prop: "sendTotalNum",
+                        search: false,
+                        overHidden: true,
+                        disabled: true,
+
+                    },
+                    {
                         label: "业务日期",
                         prop: "createTime",
                         disabled: false,
@@ -291,7 +299,7 @@ export default {
                     {
                         name: 'sendNum',
                         type: 'sum',
-                    },{
+                    }, {
                         name: 'goodsNum',
                         type: 'sum',
                     }
@@ -618,6 +626,9 @@ export default {
             // this.$set(this.optionForm,'disabled',false)
             // this.$set(this.optionContacts,'disabled',false)
         }
+        if (this.detailData.id) {
+            this.refresh()
+        }
     },
     components: {
         reportDialog
@@ -810,12 +821,23 @@ export default {
                 spinner: 'el-icon-loading',
                 background: 'rgba(255,255,255,0.7)'
             })
-            getDetails({ id: id }).then(res => {
-                this.form = res.data.data
-                loading.close();
-            }).catch(() => {
-                loading.close();
-            })
+            if (!this.detailData.id) {
+                getDetails({ id: id }).then(res => {
+                    this.form = res.data.data
+                    loading.close();
+                }).catch(() => {
+                    loading.close();
+                })
+            } else {
+                getDetails({ id: this.detailData.id }).then(res => {
+                    this.form = res.data.data
+                    loading.close();
+                }).catch(() => {
+                    loading.close();
+                })
+            }
+
+
         },
         //编辑
         rowEdit(row, index) {

+ 17 - 6
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -49,7 +49,7 @@ import { customerListAll } from "@/api/tirePartsMall/basicData/warehouse"
 import { getList, remove, getWarehouseKeeper, getGoodsInfo } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import detailsPage from "./detailsPage.vue"
 import { dateFormat } from '@/util/date'
-import {getDetails} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+import { getDetails } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 export default {
   name: "index",
   components: {
@@ -241,12 +241,18 @@ export default {
           //   console.log(this.$refs.crud.DIC.storageName[0].salesCompanyId);
           // }
         }, {
-          label: "轮胎数量",
+          label: "订单数量",
           prop: "goodsTotalNum",
           search: false,
           overHidden: true,
           // width: 120,
         }, {
+          label: "实际数量",
+          prop: "sendTotalNum",
+          search: false,
+          overHidden: true,
+          // width: 120,
+        }, {
           label: "状态",
           prop: "statusName",
           search: true,
@@ -265,8 +271,8 @@ export default {
           // width: 120,
         }, {
           label: '业务日期',
-          prop: "createTime",
-          searchProp: "createTimeList",
+          prop: "businesDate",
+          // searchProp: "businesDateList",
           type: "date",
           overHidden: true,
           search: true,
@@ -368,7 +374,12 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
-
+    if (this.$route.query.id) {
+      this.detailData = {
+        id: this.$route.query.id
+      };
+      this.detailsOpen = true;
+    }
   },
   mounted() {
     // console.log(this.$refs.crud);
@@ -459,7 +470,7 @@ export default {
     },
     expandChange(row) {
       if (!row.itemData) {
-        getDetails({ id: row.id})
+        getDetails({ id: row.id })
           .then(res => {
             this.dataList[row.$index].itemData = res.data.data.shipItemsList;
           })

+ 4 - 2
src/views/tirePartsMall/salesManagement/inboundTask/index.vue

@@ -92,6 +92,7 @@ export default {
           label: '采购单号',
           prop: "ordNo",
           search: true,
+          searchOrder:1,
           width: 140,
           overHidden: true,
         }, {
@@ -191,6 +192,7 @@ export default {
         }, {
           label: '状态',
           prop: "statusName",
+          searchOrder:2,
           width: 100,
           search: true,
           type: 'select',
@@ -216,8 +218,8 @@ export default {
           overHidden: true,
         }, {
           label: '业务日期',
-          prop: "createTime",
-          searchProp: "createTimeList",
+          prop: "businesDate",
+          searchProp: "businesDateList",
           type: "date",
           overHidden: true,
           search: true,

+ 10 - 2
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -91,6 +91,7 @@ export default {
         column: [{
           label: '销售单号',
           prop: "ordNo",
+          searchOrder:1,
           search: true,
           width: 140,
           overHidden: true,
@@ -190,6 +191,7 @@ export default {
         }, {
           label: '状态',
           prop: "statusName",
+          searchOrder:2,
           width: 100,
           search: true,
           type: 'select',
@@ -200,6 +202,12 @@ export default {
           }, {
             label: '已派工',
             value: '已派工'
+          },{
+            label: '未完成',
+            value: '未完成'
+          }, {
+            label: '已完成',
+            value: '已完成'
           }]
         }, {
           label: '备注',
@@ -209,8 +217,8 @@ export default {
           overHidden: true,
         }, {
           label: '业务日期',
-          prop: "createTime",
-          searchProp: "createTimeList",
+          prop: "businesDate",
+          searchProp: "businesDateList",
           type: "date",
           overHidden: true,
           search: true,

+ 53 - 18
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -7,13 +7,13 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button class="el-button&#45;&#45;small-yh"  type="primary" size="small"
-          v-if="editButton" @click="confirmEditing">编辑
+        <el-button class="el-button&#45;&#45;small-yh" type="primary" size="small" v-if="editButton"
+          @click="confirmEditing">编辑
         </el-button>
         <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据
         </el-button>
-        <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'"
-          @click="revoke" :disabled="isSave">撤销出库
+        <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'" @click="revoke"
+          :disabled="isSave">撤销出库
         </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" :disabled="isSave">出库完成
@@ -79,8 +79,8 @@ export default {
     return {
       switchDialog: false,
       activeName: "sale_detail",
-      editButton:true,
-      isSave:true,
+      editButton: true,
+      isSave: true,
       disabled: false,
       isDisabled: false,
       isAddDisabled: false,
@@ -142,7 +142,8 @@ export default {
         },
         {
           label: '业务日期',
-          prop: "createTime",
+          prop: "businesDate",
+          searchProp: "businesDateList",
           disabled: false,
           type: "datetime",
           value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
@@ -175,11 +176,10 @@ export default {
           disabled: true
         },
         {
-          label: '轮胎数量',
+          label: '订单数量',
           disabled: false,
           prop: "goodsTotalNum",
           disabled: true,
-
           rules: [
             {
               required: true,
@@ -189,6 +189,12 @@ export default {
           ]
         },
         {
+          label: '出库数量',
+          disabled: false,
+          prop: "sendTotalNum",
+          disabled: true,
+        },
+        {
           label: '备注',
           prop: "remarks",
           type: 'textarea',
@@ -236,12 +242,12 @@ export default {
             value: 'id'
           },
           dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
-        },{
+        }, {
           label: '轮胎编码',
           disabled: true,
           prop: 'goodsNo',
           width: 100
-        },  {
+        }, {
           label: '品牌',
           prop: 'brandId',
           disabled: true,
@@ -403,6 +409,9 @@ export default {
       console.log(2);
       this.refresh(this.onLoad.id, true)
     }
+    if (this.detailData.id) {
+      this.refresh()
+    }
 
   },
   methods: {
@@ -431,21 +440,21 @@ export default {
       })
     },
     rowEdit(row, index) {
-      if(this.form.statusName == '待出库'){
+      if (this.form.statusName == '待出库') {
         this.optionContactsBack.column.forEach(its => {
           if (its.prop == 'dot') {
             this.$set(its, 'disabled', false)
           }
         })
       }
-      console.log('this.formContacts.goodsId',this.formContacts.goodsId);
+      console.log('this.formContacts.goodsId', this.formContacts.goodsId);
       dotList({
         storageId: this.form.storageId,
         goodsId: row.goodsId
       }).then(res => {
         this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
       })
-      this.$refs.formContacts.rowEdit(row,index)
+      this.$refs.formContacts.rowEdit(row, index)
     },
     complete() {
       this.$refs["form"].validate((valid, done) => {
@@ -463,7 +472,7 @@ export default {
           }).then(res => {
             this.$message.success("出库完成");
             this.refresh(res.data.data.id)
-            
+
             loading.close();
           }).finally(() => {
             loading.close();
@@ -514,7 +523,32 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       })
-      getDetails({ id: id }).then(res => {
+      if (!this.detailData.id) {
+        getDetails({ id: id }).then(res => {
+          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.isAddDisabled = true
+          if (res.data.data.statusName == '待出库') {
+            this.isAddDisabled = true
+            this.isDisabled = true
+          }
+          this.form = res.data.data
+          this.$nextTick(() => {
+            this.$refs.formContacts.refreshTable()
+          })
+          loading.close();
+        }).catch(() => {
+          loading.close();
+        })
+      }else{
+        getDetails({ id:this.detailData.id }).then(res => {
         if (res.data.data.statusName == '已出库') {
           this.$set(this.optionForm, 'disabled', true)
           this.isAddDisabled = true
@@ -537,6 +571,7 @@ export default {
       }).catch(() => {
         loading.close();
       })
+      }
     },
     rowDelBox(row, index) {
       this.$confirm("确定将选择数据删除?", {
@@ -573,7 +608,7 @@ export default {
     },
     //编辑
     confirmEditing() {
-      if (this.form.statusName == '待出库' || this.form.statusName == '待入库'||this.form.statusName == '撤销出库') {
+      if (this.form.statusName == '待出库' || this.form.statusName == '待入库' || this.form.statusName == '撤销出库') {
         this.isDisabled = false
         this.isSave = false
         this.$set(this.optionForm, 'disabled', false)
@@ -602,7 +637,7 @@ export default {
         //   }
         // })
         this.optionForm.column.forEach(item => {
-            item.disabled = true
+          item.disabled = true
         })
         // this.isAddDisabled = false
 

+ 20 - 4
src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue

@@ -209,11 +209,19 @@ export default {
         //   prop: "numberRows",
         //   overHidden: true,
         // }
-        , {
-          label: '轮胎数量',
+        ,  {
+          label: "订单数量",
           prop: "goodsTotalNum",
+          search: false,
           overHidden: true,
+          // width: 120,
         }, {
+          label: "实际数量",
+          prop: "sendTotalNum",
+          search: false,
+          overHidden: true,
+          // width: 120,
+        } ,{
           label: '状态',
           prop: "statusName",
           search: true,
@@ -226,9 +234,9 @@ export default {
           }
         }, {
           label: '业务日期',
-          prop: "createTime",
+          prop: "businesDate",
           overHidden: true,
-          searchProp: "createTimeList",
+          searchProp: "businesDateList",
           type: "date",
           overHidden: true,
           search: true,
@@ -316,6 +324,14 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    if(this.$route.query.id){
+            this.detailData = {
+                id:this.$route.query.id
+            };
+          this.detailsOpen = true;
+    }
+    console.log(this.$route.query);
+
   },
   methods: {
     check(row) {

+ 136 - 26
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -38,7 +38,7 @@
                     <el-dropdown-menu slot="dropdown">
                         <el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批
                         </el-dropdown-item>
-                        <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">核进度
+                        <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">核进度
                         </el-dropdown-item>
 
                     </el-dropdown-menu>
@@ -80,6 +80,15 @@
                                     @click="rowAdd(row)">添加轮胎</el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
+                                    <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
+                                </el-button> 
+                            </template>
+                            <template slot="goodsId" slot-scope="{ row }">
+                                <el-select v-if="row.$cellEdit" v-model="row.goodsId" allow-create filterable default-first-option >
+                                    <el-option v-for="(item, index) in goodsIdoptions" :key="index" :label="item.cname"
+                                        :value="item.id"></el-option>
+                                </el-select>
+                                <span v-else>{{ row.goodsName }}</span>
                             </template>
                             <!-- <template slot-scope="{scope,row}" slot="goodsNum">
                                 <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
@@ -153,13 +162,29 @@
                 :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
                 <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
             </el-dialog>
+            <el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
+            :close-on-click-modal="false" v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="uploadAfter">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="derivation">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
         </div>
     </div>
 </template>
 
 <script>
 import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerInformation"
-import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, goodsListXs, inboundTask, checkOrderCG, revokeCheckOrderCG, revokeInboundTask } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { dateFormat } from "@/util/date";
+import { getToken } from "@/util/auth";
+import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, goodsListXs, inboundTask, checkOrderCG, revokeCheckOrderCG, revokeInboundTask,goodsListAll} 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";
@@ -176,6 +201,7 @@ export default {
         return {
             inventory: 0,
             isStatus: 1,
+            excelBox:false,
             goodsIdoptions: [],
             dataList: [],
             dicUrlWithCustomId: '',
@@ -208,6 +234,32 @@ export default {
             activeName: "sale_detail",
             disabled: false,
             key: 0,
+            excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "导入明细",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "上传中,请稍等",
+                        accept: '.xls,.xlsx',
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-sales-part/ship/import-item"
+                    }
+                ]
+            },
             form: {
                 orderItemsList: [],
                 paymentRecordsList: [],
@@ -289,11 +341,7 @@ export default {
                     //     message: " ",
                     //     trigger: "blur"
                     // }]
-                }, {
-                    label: '单据编号',
-                    prop: "ordNo",
-                    disabled: true
-                },
+                }, 
                 // {
                 //     label: '来源单号',
                 //     prop: "srcOrdNo",
@@ -304,17 +352,23 @@ export default {
                 //     disabled: true
                 // },
                 {
-                    label: '应收类别',
-                    prop: "receivableType",
-                    type: "select",
+                    label: '业务日期',
+                    prop: "businesDate",
+                    searchProp:"businesDateList",
                     disabled: false,
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
-                    props: {
-                        label: "dictValue",
-                        value: "dictValue"
-                    },
-                    value: '网络支付'
-                }, {
+                    type: "datetime",
+                    value: dateFormat(new Date(), 'yyyy-MM-dd'),
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd",
+                    rules: [
+                        {
+                            required: true,
+                            message: "",
+                            trigger: "blur"
+                        }
+                    ]
+                },
+               {
                     label: '联系人',
                     type: "select",
                     prop: "contacts",
@@ -378,15 +432,34 @@ export default {
                 //     disabled: true
                 // }, 
                 {
+                    label: '应收类别',
+                    prop: "receivableType",
+                    type: "select",
+                    disabled: false,
+                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
+                    props: {
+                        label: "dictValue",
+                        value: "dictValue"
+                    },
+                    value: '网络支付'
+                }, 
+                {
                     label: '总金额',
                     prop: "totalMoney",
                     disabled: true
                 },
+                
                 {
                     label: '结算金额',
                     prop: "paymentAmountTl",
                     disabled: true
                 },
+                
+                {
+                    label: '单据编号',
+                    prop: "ordNo",
+                    disabled: true
+                },
                 {
                     label: '备注',
                     prop: "remarks",
@@ -702,7 +775,12 @@ export default {
         detailData: Object
     },
     async created() {
-        this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {}
+        this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {
+            console.log('点击了');
+            this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
+            this.$refs.formContacts.dicInit()
+
+         }
         // console.log(this.$route);
         //         if(this.$route.query.check.actId){
 
@@ -757,7 +835,6 @@ export default {
         this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
 
         this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
-
             if (this.formContacts.goodsId !== value) {
                 goodsDetail({ id: value, customId: this.dicUrlWithCustomId, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
                     this.goods = res.data.data
@@ -918,6 +995,9 @@ export default {
         editBtn(row, index) {
             console.log(123);
             this.confirmEditing()
+            console.log(row);
+            // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
+            this.$refs.formContacts.dicInit()
             this.$refs.formContacts.rowEdit(row, index);
             dotList({
                 storageId: this.form.storageId,
@@ -925,9 +1005,14 @@ export default {
             }).then(res => {
                 this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
             })
-            goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
-                this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
-            })
+        //     this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {
+        //     console.log('点击了');
+        //     this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
+        //     this.$refs.formContacts.dicInit()
+        //  }
+            // goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
+            //     this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
+            // })
         },
         //表头编辑
         confirmEditing() {
@@ -1140,7 +1225,7 @@ export default {
                         this.isDisabledTask = true
                     }
                 })
-                if(this.form.checkStatus == '审核完成'){
+                if (this.form.checkStatus == '审核完成') {
                     console.log('审核完成');
                     this.$set(this.optionForm, 'disabled', true)
                     this.$set(this.optionContactsBack, 'disabled', true)
@@ -1352,6 +1437,9 @@ export default {
                 }
             });
         },
+        inBtn(){
+
+        },
         //关闭弹窗表单
         beforeClose(done, type) {
             console.log(type);
@@ -1370,16 +1458,20 @@ export default {
                 spinner: 'el-icon-loading',
                 background: 'rgba(255,255,255,0.7)'
             })
+            goodsListAll().then(res=>{
+                console.log();
+            })
             getDetails({ id: id }).then(res => {
                 this.form = res.data.data
                 let ordForm = { srcBillNo: this.form.ordNo }
                 let _this = this
                 this.dataList = res.data.data.paymentRecordsList ? res.data.data.paymentRecordsList : [];
+                this.$nextTick(() => {
+                    this.$refs.formContacts.doLayout()
+                })
                 // getList(1, 50, ordForm).then((res) => {
                 //     this.dataList = res.data.data.records ? res.data.data.records : [];
-                //     this.$nextTick(() => {
-                //         this.$refs.formContacts.doLayout()
-                //     })
+
                 // })
                 if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核' && this.form.status !== '已退款' && this.form.status !== '待确认' && this.form.status !== '待发货') {
                     console.log(1);
@@ -1620,6 +1712,24 @@ export default {
             console.log('新增了', row);
             this.$refs.formContacts.rowAdd()
         },
+        uploadAfter(res, done, loading, column) {
+            if (res instanceof Array) {
+                this.form.orderItemsList = this.form.orderItemsList.concat(res)
+            }
+            this.excelBox = false;
+            loading = false;
+            done(res);
+        },
+        derivation() {
+            window.open(
+                `/api/blade-sales-part/ship/export-item?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
         //打印
         handlePrint() {
             this.switchDialog = !this.switchDialog;

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

@@ -261,6 +261,7 @@ export default {
           label: '业务对象',
           prop: "customerId",
           search: true,
+          remote:true,
           overHidden: true,
           type: 'select',
           props: {
@@ -272,13 +273,14 @@ export default {
           label: '仓库',
           prop: "storageId",
           search: true,
+          remote:true,
           overHidden: true,
           type: 'select',
           props: {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+          dicUrl: '/api/blade-sales-part/storageDesc/listAll?cname={{key}}',
         }, {
           label: '行数',
           prop: "numberRows",
@@ -362,6 +364,19 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
+          label: '业务日期',
+          prop: "businesDate",
+          overHidden: true,
+          searchProp: "businesDateList",
+          type: "date",
+          overHidden: true,
+          search: true,
+          width: 100,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
           label: "更新人",
           prop: "updateUserName",
           searchProp: "updateUser",

+ 104 - 57
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -38,7 +38,7 @@
                     <el-dropdown-menu slot="dropdown">
                         <el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批
                         </el-dropdown-item>
-                        <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">核进度
+                        <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">核进度
                         </el-dropdown-item>
 
                     </el-dropdown-menu>
@@ -152,6 +152,7 @@ import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerI
 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 { dateFormat } from "@/util/date";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
 import { getList } from "@/api/paymentManagement/paymentRecord"
@@ -259,6 +260,22 @@ export default {
                         trigger: "blur"
                     }]
                 }, {
+                    label: '业务员',
+                    disabled:false,
+                    prop: "salerId",
+                    type: "select",
+                    props: {
+                        label: "name",
+                        value: "id"
+                    },
+                    dicUrl: "/api/blade-user/client/getUserByRole",
+                    filterable: true,
+                    rules: [{
+                        required: true,
+                        message: " ",
+                        trigger: "blur"
+                    }]
+                }, {
                     label: '仓库',
                     prop: "storageId",
                     type: 'select',
@@ -274,30 +291,8 @@ export default {
                     //     message: " ",
                     //     trigger: "blur"
                     // }]
-                }, {
-                    label: '单据编号',
-                    prop: "ordNo",
-                    disabled: true
-                }, {
-                    label: '来源单号',
-                    prop: "srcOrdNo",
-                    disabled: true
-                }, {
-                    label: '业务来源',
-                    prop: "businessSource",
-                    disabled: true
-                }, {
-                    label: '应收类别',
-                    prop: "receivableType",
-                    type: "select",
-                    disabled: false,
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
-                    props: {
-                        label: "dictValue",
-                        value: "dictValue"
-                    },
-                    value: '网络支付'
-                }, {
+                }, 
+                {
                     label: '联系人',
                     type: "select",
                     prop: "contacts",
@@ -316,12 +311,45 @@ export default {
                     label: '收货地址',
                     prop: "recAddress",
                     type: 'select',
+                    filterable: true,
                     disabled: false,
                     props: {
                         label: 'address',
                         value: 'address'
                     },
                     dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
+                },  {
+                    label: '业务日期',
+                    prop: "businesDate",
+                    searchProp: "businesDateList",
+                    disabled: false,
+                    type: "datetime",
+                    value: dateFormat(new Date(), 'yyyy-MM-dd'),
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd",
+                    rules: [
+                        {
+                            required: true,
+                            message: "",
+                            trigger: "blur"
+                        }
+                    ]
+                }, {
+                    label: '收款方式',
+                    prop: "receivableType",
+                    type: "select",
+                    disabled: false,
+                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
+                    props: {
+                        label: "dictValue",
+                        value: "dictValue"
+                    },
+                    value: '网络支付'
+                },
+                {
+                    label: '业务来源',
+                    prop: "businessSource",
+                    disabled: true
                 }, {
                     label: '配送方式',
                     type: 'select',
@@ -363,7 +391,15 @@ export default {
                     label: '结算金额',
                     prop: "paymentAmountTl",
                     disabled: true
+                },{
+                    label: '单据编号',
+                    prop: "ordNo",
+                    disabled: true
                 }, {
+                    label: '来源单号',
+                    prop: "srcOrdNo",
+                    disabled: true
+                },{
                     label: '备注',
                     prop: "remarks",
                     type: 'textarea',
@@ -376,6 +412,7 @@ export default {
             optionContacts: {},
             optionContactsBack: {
                 disabled: false,
+                goodsId:'',
                 border: true,
                 align: 'center',
                 index: true,
@@ -431,7 +468,7 @@ export default {
                         value: 'id'
                     },
                     // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
-                    dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=1658279303722418177&enableOrNot=1"
+                    dicUrl: `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=&enableOrNot=1&stock=${this.goodsId}`
                     // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
                 }, {
                     label: '数量',
@@ -689,6 +726,7 @@ export default {
 
         //             this.isExamineBtn = false
         //         }
+
         this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
             if (this.formContacts.goodsId !== value) {
                 goodsDetail({ id: value, customId: this.dicUrlWithCustomId, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
@@ -830,7 +868,6 @@ export default {
             goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
                 this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
             })
-
         },
         'form.storageId'(newStorageId, oldStorageId) {
             goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
@@ -897,7 +934,7 @@ export default {
     },
     methods: {
         editBtn(row, index) {
-            console.log(123);
+
             this.confirmEditing()
             this.$refs.formContacts.rowEdit(row, index);
             dotList({
@@ -1088,12 +1125,13 @@ export default {
                     // this.isDisabled = true
                     console.log('待确认');
                     this.optionForm.column.forEach(item => {
-                        if (item.label === '仓库' || item.label === '备注' || item.label === '配送方式' || item.label === '物流公司') {
-                            this.$set(item, 'disabled', false)
-                        } else {
+                        if (item.label === '成本' || item.label === '毛利' || item.label === '销售金额' || item.label === '运费' || item.label === '总金额' || item.label === '结算金额' || item.label === '单据编号' || item.label === '来源编号') {
                             this.$set(item, 'disabled', true)
+                        } else {
+                            this.$set(item, 'disabled', false)
                         }
                     })
+                    this.isContacts = false
                     this.optionContactsBack.column.forEach(its => {
                         if (its.prop == 'remarks' || its.prop == 'dot') {
                             this.$set(its, 'disabled', false)
@@ -1108,6 +1146,7 @@ export default {
                     this.isSaveBtn = false;
                     this.isDisabledTask = false;
                     this.viewDisabled = false;
+                    this.isDisabled = true
                 }
                 // this.$set(this.form, 'shipType', '物流')
                 // this.$set(this.form, 'receivableType', '现金')
@@ -1152,33 +1191,35 @@ export default {
                         this.$set(this.optionForm, 'disabled', true)
                         this.$set(this.optionContactsBack, 'disabled', true)
                         this.$refs["form"].validate((valid, done) => {
+                            done();
+                            console.log(valid);
                             if (valid) {
-                                        submit({
-                                            bsType: "XS",
-                                            ...this.form
-                                        }).then(res => {
-                                            console.log(1);
-                                            this.refresh(res.data.data.id)
-                                            this.isDisabledTask = false
-                                            generateShipTask(this.form).then(res => {
-                                                console.log(res.data);
-                                                // 将按钮文本更改为"撤销任务"
-                                                this.buttonText = '撤销任务';
-                                                // 将按钮颜色更改为对应的颜色
-                                                this.buttonColor = 'warning'; // 比如改为warning
-                                                this.refreshs(res.data.data.id, true)
-                                                this.isContacts = true
-                                                this.$message.success("生成出库任务成功");
-                                                this.isApplySettlement = false
-                                                this.isAdd = true
-                                                this.isDisabled = true
-                                                this.isAddBtn = true
-                                            }).finally(() => {
-                                                loading.close();
-                                            });
-                                        }).catch(() => {
-                                            loading.close();
-                                        });
+                                submit({
+                                    bsType: "XS",
+                                    ...this.form
+                                }).then(res => {
+                                    console.log(1);
+                                    this.refresh(res.data.data.id)
+                                    this.isDisabledTask = false
+                                    generateShipTask(this.form).then(res => {
+                                        console.log(res.data);
+                                        // 将按钮文本更改为"撤销任务"
+                                        this.buttonText = '撤销任务';
+                                        // 将按钮颜色更改为对应的颜色
+                                        this.buttonColor = 'warning'; // 比如改为warning
+                                        this.refreshs(res.data.data.id, true)
+                                        this.isContacts = true
+                                        this.$message.success("生成出库任务成功");
+                                        this.isApplySettlement = false
+                                        this.isAdd = true
+                                        this.isDisabled = true
+                                        this.isAddBtn = true
+                                    }).finally(() => {
+                                        loading.close();
+                                    });
+                                }).catch(() => {
+                                    loading.close();
+                                });
                                 done();
                             } else {
                                 this.$message.error('请选择仓库')
@@ -1344,6 +1385,9 @@ export default {
                 let _this = this
 
                 this.dataList = res.data.data.paymentRecordsList ? res.data.data.paymentRecordsList : [];
+                this.$nextTick(() => {
+                    this.$refs.formContacts.doLayout()
+                })
                 // getList(1, 50, ordForm).then((res) => {
                 //     this.dataList = res.data.data.records ? res.data.data.records : [];
                 //     this.$nextTick(() => {
@@ -1395,6 +1439,7 @@ export default {
                 }
                 if (this.form.status == '待发货') {
                     this.isApplySettlement = false
+                    this.isDisabled = true
                 }
                 //成本、毛利对销售角色隐藏
                 this.optionForm.column.forEach(its => {
@@ -1683,6 +1728,8 @@ export default {
                 this.$message.error('请选择客户')
                 return
             }
+            this.findObject(this.optionContactsBack.column,'goodsId').dicUrl=`/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}&enableOrNot=1&stock=${this.form.storageId}`
+
             this.optionContactsBack.column.forEach(its => {
                 if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
                     its.disabled = false

+ 44 - 3
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -6,6 +6,9 @@
         @expand-change="expandChange" @refresh-change="refreshChange"
         @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 269)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 269)" :page.sync="page">
+        <template slot-scope="{ row }" slot="status">
+          <span  v-for=" item in orderStatusList" :style="{ color: item.colour }" v-if="item.dictKey == row.status">{{ item.dictValue }}</span>
+        </template>
         <template slot-scope="{ row }" slot="expand">
           <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
             class="itemTable"></avue-crud>
@@ -51,6 +54,7 @@ export default {
   data() {
     return {
       detailsOpen: false,
+      orderStatusList:[],
       loading: false,
       search: {},
       form: {},
@@ -200,24 +204,43 @@ export default {
           label: '业务对象',
           prop: "customerId",
           search: true,
+          remote: true,
           overHidden: true,
           type: 'select',
           props: {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
+          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&cname={{key}}',
+        }, {
+          label: '业务员',
+          disabled: false,
+          prop: "salerId",
+          search: true,
+          type: "select",
+          props: {
+            label: "name",
+            value: "id"
+          },
+          dicUrl: "/api/blade-user/client/getUserByRole",
+          filterable: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }, {
           label: '仓库',
           prop: "storageId",
           search: true,
           overHidden: true,
+          remote: true,
           type: 'select',
           props: {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+          dicUrl: '/api/blade-sales-part/storageDesc/listAll?cname={{key}}',
         }, {
           label: '行数',
           prop: "numberRows",
@@ -244,7 +267,7 @@ export default {
         }, {
           label: '结算状态',
           prop: "actualPaymentStatus",
-          searchProp:'actualPaymentType',
+          searchProp: 'actualPaymentType',
           search: true,
           overHidden: true,
           type: 'select',
@@ -274,6 +297,19 @@ export default {
           prop: "dueDate",
           overHidden: true,
         }, {
+          label: '业务日期',
+          prop: "businesDate",
+          overHidden: true,
+          searchProp: "businesDateList",
+          type: "date",
+          overHidden: true,
+          search: true,
+          width: 100,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
           label: "制单人",
           prop: "createUserName",
           searchProp: "createUser",
@@ -359,6 +395,11 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    this.getWorkDicts("sales_Status").then(res => {
+            this.orderStatusList = res.data.data
+      console.log(this.orderStatusList);
+
+        });
   },
   methods: {
     check(row) {

+ 10 - 10
src/views/tirePartsMall/statisticAnalysis/supplierTransactions/js/optionList.js

@@ -76,16 +76,16 @@ export const option = {
     //   overHidden: true,
     //   index: 7
     // },
-    {
-      label: "信用额度余额",
-      prop: "creditLimitBalance",
-      overHidden: true,
-    },
-    {
-      label: "账期",
-      prop: "accountPeriod",
-      overHidden: true,
-    },
+    // {
+    //   label: "信用额度余额",
+    //   prop: "creditLimitBalance",
+    //   overHidden: true,
+    // },
+    // {
+    //   label: "账期",
+    //   prop: "accountPeriod",
+    //   overHidden: true,
+    // },
     // {
     //   label: "状态",
     //   prop: "status",