zh před 2 roky
rodič
revize
97da2c97ff

+ 1 - 1
src/api/barcode.js

@@ -37,7 +37,7 @@ export function importListCustomerCodeV2(data) {
 
 
 export function luBaoDownloadDownload(data, name) {
 export function luBaoDownloadDownload(data, name) {
   return getBlob({
   return getBlob({
-    url: '/customer/code/luBaoDownload',
+    url: '/customer/code/ShangJiaDownload',
     data,
     data,
     name
     name
   })
   })

+ 1 - 1
src/api/sales.js

@@ -144,7 +144,7 @@ export function setSendRevoke(params) {
   return request({
   return request({
     url: '/customer/frontOrder/sendRevoke',
     url: '/customer/frontOrder/sendRevoke',
     method: 'post',
     method: 'post',
-    data: params
+    params
   })
   })
 }
 }
 
 

+ 2 - 3
src/views/basic_data/dealer/components/subMerchantForm.vue

@@ -121,7 +121,7 @@
 
 
         <div style="margin: 20px">
         <div style="margin: 20px">
           <el-button type="primary" size="mini" @click="handleExamine">同意</el-button>
           <el-button type="primary" size="mini" @click="handleExamine">同意</el-button>
-          <el-button type="primary" size="mini" @click="handleExamine('SAVE')">回</el-button>
+          <el-button type="primary" size="mini" @click="handleExamine('SAVE')">回</el-button>
         </div>
         </div>
       </el-card>
       </el-card>
     </el-form>
     </el-form>
@@ -212,8 +212,7 @@ export default {
         examineStatus: status,
         examineStatus: status,
         approvalRemark: this.formData.approvalRemark
         approvalRemark: this.formData.approvalRemark
       }).then(res => {
       }).then(res => {
-        console.log(res)
-        this.$successMsg('审核成功')
+        this.$successMsg(status === 'OK' ? '审核成功' : '驳回成功')
         this.$emit('close')
         this.$emit('close')
       })
       })
     },
     },

+ 16 - 16
src/views/sales_control/adjust_warehouse.vue

@@ -3,16 +3,16 @@
     <template-page
     <template-page
       v-show="!pageType"
       v-show="!pageType"
       ref="pageRef"
       ref="pageRef"
-      :getList="getList"
-      :exportList="exportList"
+      :get-list="getList"
+      :export-list="exportList"
       :operation="operation()"
       :operation="operation()"
-      :columnParsing="columnParsing"
-      :optionsEvensGroup="optionsEvensGroup"
-    >
-    </template-page>
-    <warehouse-form v-if="pageType == 1" :pageType="pageType" @close="handleClose" />
-    <warehouse-examine v-if="pageType == 2" :detailsId="detailsId" :pageType="pageType" @close="handleClose" />
-    <warehouse-details v-if="pageType == 3" :detailsId="detailsId" :pageType="pageType" @close="handleClose" />
+      :column-parsing="columnParsing"
+      :options-evens-group="optionsEvensGroup"
+      :replace-or-not-map="false"
+    />
+    <warehouse-form v-if="pageType == 1" :page-type="pageType" @close="handleClose" />
+    <warehouse-examine v-if="pageType == 2" :details-id="detailsId" :page-type="pageType" @close="handleClose" />
+    <warehouse-details v-if="pageType == 3" :details-id="detailsId" :page-type="pageType" @close="handleClose" />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -83,10 +83,10 @@ export default {
     operation() {
     operation() {
       return (h, { row, index, column }) => {
       return (h, { row, index, column }) => {
         return (
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             <el-button
             <el-button
-              size="mini"
-              type="text"
+              size='mini'
+              type='text'
               onClick={() => {
               onClick={() => {
                 this.detailsId = row.id
                 this.detailsId = row.id
                 this.pageType = 3
                 this.pageType = 3
@@ -96,8 +96,8 @@ export default {
             </el-button>
             </el-button>
             {row.examineStatus != 'OK' && row.examineStatus != 'FAIL' ? (
             {row.examineStatus != 'OK' && row.examineStatus != 'FAIL' ? (
               <el-button
               <el-button
-                size="mini"
-                type="text"
+                size='mini'
+                type='text'
                 onClick={() => {
                 onClick={() => {
                   this.detailsId = row.id
                   this.detailsId = row.id
                   this.pageType = 2
                   this.pageType = 2
@@ -114,9 +114,9 @@ export default {
                     this.$refs.pageRef.refreshList()
                     this.$refs.pageRef.refreshList()
                   })
                   })
                 }}
                 }}
-                title="删除吗?"
+                title='删除吗?'
               >
               >
-                <el-button slot="reference" size="mini" type="text">
+                <el-button slot='reference' size='mini' type='text'>
                   删除
                   删除
                 </el-button>
                 </el-button>
               </el-popconfirm>
               </el-popconfirm>

+ 4 - 7
src/views/sales_control/sales_management/components/customer_sales_details.vue

@@ -5,13 +5,13 @@
     <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
     <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
       <template #events>
       <template #events>
         <el-button
         <el-button
-          v-if="details.status == 1 && isFront !== false"
+          v-if="details.status == 1 "
           type="primary"
           type="primary"
           size="mini"
           size="mini"
           @click="handleInform(2)"
           @click="handleInform(2)"
         >通知发货</el-button>
         >通知发货</el-button>
-        <el-button v-if="details.status == 2 && isFront !== false" size="mini" @click="handleSendRevoke(1)">撤销发货</el-button>
-        <el-button v-if="isFront === false && details.status == 1" type="primary" size="mini" @click="handleSignIn(4)">
+        <el-button v-if="details.status == 2 " size="mini" @click="handleSendRevoke(1)">撤销发货</el-button>
+        <el-button v-if=" details.status == 1" type="primary" size="mini" @click="handleSignIn(4)">
           签收
           签收
         </el-button>
         </el-button>
       </template>
       </template>
@@ -105,13 +105,10 @@ export default {
           content: '创建成功',
           content: '创建成功',
           timestamp: '2018-04-11'
           timestamp: '2018-04-11'
         }
         }
-      ],
-      isFront: null
+      ]
     }
     }
   },
   },
   created() {
   created() {
-    this.isFront = JSON.parse(localStorage.getItem('supply_user')).isFront
-    console.log(this.isFront)
     if (this.detailsId) {
     if (this.detailsId) {
       getFrontOrderDetail({ id: this.detailsId }).then(res => {
       getFrontOrderDetail({ id: this.detailsId }).then(res => {
         this.dataList = res.data.orders
         this.dataList = res.data.orders

+ 6 - 5
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -23,7 +23,7 @@
         <div v-if="!detailsId">
         <div v-if="!detailsId">
           <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
           <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
           <el-button v-if="dis" size="mini" @click="onReset">重置 </el-button>
           <el-button v-if="dis" size="mini" @click="onReset">重置 </el-button>
-          <el-button v-if="isFront !== false" size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
+          <el-button  size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
         </div>
         </div>
         <div v-else>
         <div v-else>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
@@ -94,7 +94,7 @@ export default {
           width: '180'
           width: '180'
         },
         },
         {
         {
-          prop: 'lockCustomerStockNum',
+          prop: 'customerStockNum',
           label: '自有仓结存数量',
           label: '自有仓结存数量',
           width: '180'
           width: '180'
         },
         },
@@ -112,7 +112,7 @@ export default {
           type: 'text'
           type: 'text'
         }
         }
       ],
       ],
-      isFront: JSON.parse(localStorage.getItem('supply_user')).isFront,
+      isFront: false,
       salesId: '',
       salesId: '',
       stokType: null
       stokType: null
     }
     }
@@ -158,7 +158,7 @@ export default {
           width: '180'
           width: '180'
         },
         },
         {
         {
-          prop: 'lockCustomerStockNum',
+          prop: 'customerStockNum',
           label: '自有仓结存数量',
           label: '自有仓结存数量',
           width: '180'
           width: '180'
         },
         },
@@ -339,7 +339,8 @@ export default {
               ]
               ]
               if (this.isFront === false) {
               if (this.isFront === false) {
                 this.handleBack()
                 this.handleBack()
-              } this.salesId = res.data
+              }
+               this.salesId = res.data
               this.$set(this.$refs.header.screenForm, 'id', res.data)
               this.$set(this.$refs.header.screenForm, 'id', res.data)
               this.$forceUpdate()
               this.$forceUpdate()
             })
             })

+ 2 - 2
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -23,7 +23,7 @@
         <div v-if="!detailsId">
         <div v-if="!detailsId">
           <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
           <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
           <el-button v-if="dis" size="mini" @click="onReset">重置</el-button>
           <el-button v-if="dis" size="mini" @click="onReset">重置</el-button>
-          <el-button v-if="isFront !== false" size="mini" :disabled="dis" @click="handleInform(2)">退货通知</el-button>
+          <el-button  size="mini" :disabled="dis" @click="handleInform(2)">退货通知</el-button>
         </div>
         </div>
         <div v-else>
         <div v-else>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
@@ -133,7 +133,7 @@ export default {
           type: 'text'
           type: 'text'
         }
         }
       ],
       ],
-      isFront: JSON.parse(localStorage.getItem('supply_user')).isFront,
+      isFront: false,
       salesId: ''
       salesId: ''
     }
     }
   },
   },

+ 16 - 16
src/views/sales_control/sales_management/customer_sales_list.vue

@@ -3,20 +3,20 @@
     <template-page
     <template-page
       v-show="!pageType"
       v-show="!pageType"
       ref="pageRef"
       ref="pageRef"
-      :getList="getList"
-      :exportList="exportList"
+      :get-list="getList"
+      :export-list="exportList"
       :operation="operation()"
       :operation="operation()"
-      :columnParsing="columnParsing"
-      :optionsEvensGroup="optionsEvensGroup"
-    >
-    </template-page>
+      :column-parsing="columnParsing"
+      :options-evens-group="optionsEvensGroup"
+      :replace-or-not-map="false"
+    />
     <customer_sales_form
     <customer_sales_form
-      :detailsId="detailsId"
       v-if="pageType === 1 || pageType === 2"
       v-if="pageType === 1 || pageType === 2"
-      :pageType="pageType"
+      :details-id="detailsId"
+      :page-type="pageType"
       @close="handleClose"
       @close="handleClose"
     />
     />
-    <customer_sales_details  v-if="pageType==3" :detailsId="detailsId" :pageType="pageType" @close="handleClose" />
+    <customer_sales_details v-if="pageType==3" :details-id="detailsId" :page-type="pageType" @close="handleClose" />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -103,10 +103,10 @@ export default {
     operation() {
     operation() {
       return (h, { row, index, column }) => {
       return (h, { row, index, column }) => {
         return (
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             <el-button
             <el-button
-              size="mini"
-              type="text"
+              size='mini'
+              type='text'
               onClick={() => {
               onClick={() => {
                 this.detailsId = row.id
                 this.detailsId = row.id
                 this.pageType = 3
                 this.pageType = 3
@@ -117,8 +117,8 @@ export default {
 
 
             {row.status == 1 ? (
             {row.status == 1 ? (
               <el-button
               <el-button
-                size="mini"
-                type="text"
+                size='mini'
+                type='text'
                 onClick={() => {
                 onClick={() => {
                   this.detailsId = row.id
                   this.detailsId = row.id
                   this.pageType = 2
                   this.pageType = 2
@@ -135,9 +135,9 @@ export default {
                     this.$refs.pageRef.refreshList()
                     this.$refs.pageRef.refreshList()
                   })
                   })
                 }}
                 }}
-                title="删除吗?"
+                title='删除吗?'
               >
               >
-                <el-button slot="reference" size="mini" type="text">
+                <el-button slot='reference' size='mini' type='text'>
                   删除
                   删除
                 </el-button>
                 </el-button>
               </el-popconfirm>
               </el-popconfirm>

+ 15 - 15
src/views/sales_control/sales_management/return_sales_list.vue

@@ -3,15 +3,15 @@
     <template-page
     <template-page
       v-show="!pageType"
       v-show="!pageType"
       ref="pageRef"
       ref="pageRef"
-      :getList="getList"
-      :exportList="exportList"
+      :get-list="getList"
+      :export-list="exportList"
       :operation="operation()"
       :operation="operation()"
-      :columnParsing="columnParsing"
-      :optionsEvensGroup="optionsEvensGroup"
-    >
-    </template-page>
-    <return_sales_form v-if="pageType === 1 || pageType === 2" :details-id="detailsId" :pageType="pageType" @close="handleClose"/>
-    <return_sales_details v-if="pageType === 3" :details-id="detailsId" :pageType="pageType" @close="handleClose"/>
+      :column-parsing="columnParsing"
+      :options-evens-group="optionsEvensGroup"
+      :replace-or-not-map="false"
+    />
+    <return_sales_form v-if="pageType === 1 || pageType === 2" :details-id="detailsId" :page-type="pageType" @close="handleClose" />
+    <return_sales_details v-if="pageType === 3" :details-id="detailsId" :page-type="pageType" @close="handleClose" />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -78,10 +78,10 @@ export default {
     operation() {
     operation() {
       return (h, { row, index, column }) => {
       return (h, { row, index, column }) => {
         return (
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             <el-button
             <el-button
-              size="mini"
-              type="text"
+              size='mini'
+              type='text'
               onClick={() => {
               onClick={() => {
                 this.detailsId = row.id
                 this.detailsId = row.id
                 this.pageType = 3
                 this.pageType = 3
@@ -92,8 +92,8 @@ export default {
 
 
             {row.status == 1 ? (
             {row.status == 1 ? (
               <el-button
               <el-button
-                size="mini"
-                type="text"
+                size='mini'
+                type='text'
                 onClick={() => {
                 onClick={() => {
                   this.detailsId = row.id
                   this.detailsId = row.id
                   this.pageType = 2
                   this.pageType = 2
@@ -110,9 +110,9 @@ export default {
                     this.$refs.pageRef.refreshList()
                     this.$refs.pageRef.refreshList()
                   })
                   })
                 }}
                 }}
-                title="删除吗?"
+                title='删除吗?'
               >
               >
-                <el-button slot="reference" size="mini" type="text">
+                <el-button slot='reference' size='mini' type='text'>
                   删除
                   删除
                 </el-button>
                 </el-button>
               </el-popconfirm>
               </el-popconfirm>

+ 43 - 29
src/views/supply/transferOrder/transferOrderForm.vue

@@ -37,18 +37,18 @@
     <!-- 新增 -->
     <!-- 新增 -->
     <div v-if="!comDisabled">
     <div v-if="!comDisabled">
       <template v-if="moduleType === 1">
       <template v-if="moduleType === 1">
-        <el-button type="primary" size="default" @click="onSubmit('WAIT')">提交</el-button>
-        <el-button size="default" @click="onSubmit('SAVE')">保存</el-button>
+        <el-button type="primary" size="mini" @click="onSubmit('WAIT')">提交</el-button>
+        <el-button size="mini" @click="onSubmit('SAVE')">保存</el-button>
       </template>
       </template>
       <template v-else>
       <template v-else>
-        <el-button type="primary" size="default" @click="onSubmit">编辑</el-button>
+        <el-button type="primary" size="mini" @click="onSubmit">编辑</el-button>
       </template>
       </template>
-      <el-button size="default" @click="onReset">重置</el-button>
+      <el-button size="mini" @click="onReset">重置</el-button>
     </div>
     </div>
     <!-- 审核 /详情-->
     <!-- 审核 /详情-->
     <div v-if="moduleType === 3 || moduleType === 2">
     <div v-if="moduleType === 3 || moduleType === 2">
-      <el-button v-if="moduleType === 3" type="primary" size="default" @click="onExamine('OK')">同意</el-button>
-      <el-button size="default" @click="onInvoice('SAVE')">撤回</el-button>
+      <el-button v-if="moduleType === 3" type="primary" size="mini" @click="onExamine('OK')">同意</el-button>
+      <el-button size="mini" @click="onInvoice('SAVE')">撤回</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -140,11 +140,16 @@ export default {
       sonCustomerList: [],
       sonCustomerList: [],
       logisticsData: [],
       logisticsData: [],
       sonCustomerNumberList: [],
       sonCustomerNumberList: [],
-      sonCustomerNameList: []
+      sonCustomerNameList: [],
+      setDisabled: {
+        disabledDate: time => {
+          return time.getTime() < new Date() - 24 * 3600 * 1000
+        }
+      }
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['customerNumber']),
+    ...mapGetters(['customerNumber', 'customerName']),
     comDisabled() {
     comDisabled() {
       // 禁止
       // 禁止
       return !!~[2, 3].indexOf(this.moduleType || 1)
       return !!~[2, 3].indexOf(this.moduleType || 1)
@@ -171,7 +176,9 @@ export default {
             style: { width: '100%' },
             style: { width: '100%' },
             placeholder: '选择日期时间',
             placeholder: '选择日期时间',
             valueFormat: 'yyyy-MM-dd HH:mm:ss',
             valueFormat: 'yyyy-MM-dd HH:mm:ss',
-            disabled: this.comDisabled
+            disabled: this.comDisabled,
+            pickerOptions: this.setDisabled
+
           },
           },
           formItemAttributes: { label: '调整日期', prop: 'transferTime' }
           formItemAttributes: { label: '调整日期', prop: 'transferTime' }
         },
         },
@@ -181,21 +188,12 @@ export default {
           attributes: { disabled: true, placeholder: '系统自动生成' },
           attributes: { disabled: true, placeholder: '系统自动生成' },
           formItemAttributes: { label: '制单人', prop: 'createBy' }
           formItemAttributes: { label: '制单人', prop: 'createBy' }
         },
         },
-        // {
-        //   name: 'el-input',
-        //   md: 6,
-        //   attributes: { disabled: this.comDisabled, placeholder: '请输入' },
-        //   formItemAttributes: { label: '商家编号', prop: 'transferCustomerNumber' }
-        // },
-        // {
-        //   name: 'el-input',
-        //   md: 6,
-        //   attributes: { disabled: this.comDisabled, placeholder: '请输入' },
-        //   formItemAttributes: { label: '商家名称', prop: 'transferCustomerName' }
-        // },
         {
         {
           name: 'el-select',
           name: 'el-select',
           options: this.sonCustomerNumberList,
           options: this.sonCustomerNumberList,
+          events: {
+            change: (e) => this.handleChange(e, 'transferCustomerNumber')
+          },
           md: 6,
           md: 6,
           attributes: {
           attributes: {
             clearable: true,
             clearable: true,
@@ -208,6 +206,9 @@ export default {
           name: 'el-select',
           name: 'el-select',
           options: this.sonCustomerNameList,
           options: this.sonCustomerNameList,
           md: 6,
           md: 6,
+          events: {
+            change: (e) => this.handleChange(e, 'transferCustomerName')
+          },
           attributes: {
           attributes: {
             clearable: true,
             clearable: true,
             filterable: true,
             filterable: true,
@@ -219,8 +220,8 @@ export default {
           name: 'el-select',
           name: 'el-select',
           md: 6,
           md: 6,
           options: [
           options: [
-            { label: '嘉贤前置仓', value: 'JIAXIAN' },
-            { label: '商家仓', value: 'SHANGJIA' }
+            { label: '嘉贤前置仓', value: 'JIAXIAN' }
+            // { label: '商家仓', value: 'SHANGJIA' }
           ],
           ],
           attributes: { disabled: this.comDisabled, placeholder: '请输入' },
           attributes: { disabled: this.comDisabled, placeholder: '请输入' },
           formItemAttributes: { label: '调拨仓库', prop: 'stockType' }
           formItemAttributes: { label: '调拨仓库', prop: 'stockType' }
@@ -282,12 +283,12 @@ export default {
             width: 300
             width: 300
           }
           }
         },
         },
-        {
+        ...[this.moduleType === 1 ? {
           columnAttributes: {
           columnAttributes: {
             label: '可调拨库存数',
             label: '可调拨库存数',
             prop: 'frontStockNum'
             prop: 'frontStockNum'
           }
           }
-        },
+        } : {}],
         {
         {
           columnAttributes: {
           columnAttributes: {
             label: '调拨数量',
             label: '调拨数量',
@@ -603,6 +604,8 @@ export default {
       }
       }
     },
     },
     getStagecustomerListV2() {
     getStagecustomerListV2() {
+      this.formData.customerNumber = this.customerNumber
+      this.formData.customerName = this.customerName
       getStagecustomerListV2({
       getStagecustomerListV2({
         pageNum: 1,
         pageNum: 1,
         pageSize: -1,
         pageSize: -1,
@@ -614,16 +617,17 @@ export default {
           }
           }
         ]
         ]
       }).then(res => {
       }).then(res => {
+        this.sonCustomerList = res.data.records
         this.sonCustomerNameList = res.data.records.map(k => {
         this.sonCustomerNameList = res.data.records.map(k => {
           return {
           return {
             label: k.name,
             label: k.name,
-            value: k.name
+            value: k.id
           }
           }
         })
         })
         this.sonCustomerNumberList = res.data.records.map(k => {
         this.sonCustomerNumberList = res.data.records.map(k => {
           return {
           return {
             label: k.number,
             label: k.number,
-            value: k.number
+            value: k.id
           }
           }
         })
         })
       })
       })
@@ -645,6 +649,7 @@ export default {
           materialOldNumber: k.materialOldNumber,
           materialOldNumber: k.materialOldNumber,
           notes: '',
           notes: '',
           qty: 0,
           qty: 0,
+          frontStockNum: k.frontStockNum,
           specification: k.specification,
           specification: k.specification,
           disabledId: k.disabledId,
           disabledId: k.disabledId,
           stockName: '嘉贤前置仓',
           stockName: '嘉贤前置仓',
@@ -693,8 +698,17 @@ export default {
       this.$refs.pageRef &&
       this.$refs.pageRef &&
         this.$refs.pageRef.$children[0].$children[0].$children[2].$children[0].$children[0].clearSelection()
         this.$refs.pageRef.$children[0].$children[0].$children[2].$children[0].$children[0].clearSelection()
     },
     },
-    handleChangeNumber(e){
-      console.log(e);
+    handleChange(e, type) {
+      if (e) {
+        if (type === 'transferCustomerNumber') {
+          this.formData.transferCustomerName = this.sonCustomerList.find(k => k.id === e).name
+        } else {
+          this.formData.transferCustomerNumber = this.sonCustomerList.find(k => k.id === e).number
+        }
+      } else {
+        this.formData.transferCustomerNumber = ''
+        this.formData.transferCustomerName = ''
+      }
     },
     },
     handlerefreshList() {
     handlerefreshList() {
       this.$emit('refresh')
       this.$emit('refresh')

+ 0 - 1
src/views/supply/transferOrder/transferOrderList.vue

@@ -63,7 +63,6 @@ export default {
                   this.visible = true
                   this.visible = true
                   this.moduleType = 1
                   this.moduleType = 1
                 })
                 })
-              // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
               }
               }
             ]
             ]
           ] : []
           ] : []