lilei 2 gadi atpakaļ
vecāks
revīzija
9fbeb6fa62

+ 16 - 8
src/views/common/custList.vue

@@ -80,14 +80,22 @@ export default {
       })
     },
     handleChange (value) {
-      const row = this.data.filter(item => item.dealerSn == value.key)
-      Object.assign(this, {
-        dealerName: value,
-        data: [],
-        fetching: false
-      })
-      this.$emit('change', value || { key: undefined }, row[0], this.id)
-      // this.$emit('input', value.key)
+      console.log(value)
+      if (value) {
+        const row = this.data.filter(item => item.dealerSn == value.key)
+        Object.assign(this, {
+          dealerName: value,
+          data: [],
+          fetching: false
+        })
+        this.$emit('change', value || { key: undefined }, row[0], this.id)
+        // this.$emit('input', value.key)
+      } else {
+        this.setDufaultVal('')
+        this.resetForm()
+        this.$emit('change', value || { key: undefined }, undefined, this.id)
+        // this.$emit('input', value.key)
+      }
     },
     resetForm () {
       this.dealerName = []

+ 12 - 2
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -182,16 +182,25 @@ export default {
     accountNameSnChange (v, row) {
       console.log(v, row)
       if (this.form.accountType == 'CUSTOMER') {
-        this.form.accountNameSn = v.key
         if (row) {
+          this.form.accountNameSn = v.key
           this.form.provinceSn = row.provinceSn
           this.form.citySn = row.citySn
           this.form.provinceName = row.provinceName
           this.form.cityName = row.cityName
           if (row.subareaNameSet) {
-            this.form.subareaNameList = row.subareaNameSet.filter(item => item !== '中国')
+            const a = row.subareaNameSet.filter(item => item !== '中国')
+            this.form.subareaNameList = [a[0]]
             this.form.subareaSnList = [this.$refs.subareaBox.getValByName(this.form.subareaNameList)[0]]
           }
+        } else {
+          this.form.accountNameSn = ''
+          this.form.provinceSn = ''
+          this.form.citySn = ''
+          this.form.provinceName = ''
+          this.form.cityName = ''
+          this.form.subareaNameList = ''
+          this.form.subareaSnList = ''
         }
       }
       this.$nextTick(() => {
@@ -201,6 +210,7 @@ export default {
     // 分区
     subareaChange (v, row) {
       const arr = []
+      console.log(v, row)
       row.map(item => arr.push(item.subareaName))
       this.form.subareaNameList = arr
     },

+ 0 - 1
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -20,7 +20,6 @@
             class="button-info"
             id="salesDetail-fhfl-print-btn"
             :disabled="localDataSource.length==0"
-            v-if="$hasPermissions('B_dispatchTypePrint')"
             @click="handlePrint('DISPATCH_BILL_TYPE')">发货分类打印</a-button>
           <a-divider type="vertical" />
           <a-button

+ 1 - 1
src/views/salesManagement/pushOrderManagement/list.vue

@@ -127,7 +127,7 @@
             type="link"
             class="button-warning"
             :loading="!!tipData"
-            v-if="record.printStatus=='UNABLE_PRINT'&&$hasPermissions('B_UNABLE_PRINT')"
+            v-if="record.printStatus=='UNABLE_PRINT'&&record.voidFlag=='0'&&$hasPermissions('B_UNABLE_PRINT')"
             @click="handlePrint(record)"
           >允许备货打印</a-button>
           <span v-else>--</span>

+ 2 - 2
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -54,13 +54,13 @@
           type="primary"
           class="button-info"
           id="pushOrderManagement-print-save"
-          v-if="nowType=='print'"
+          v-if="nowType=='print'&&$hasPermissions('B_dispatchTypePrintView')"
           @click="handleSave('preview')"
           style="margin-left: 15px;">打印预览</a-button>
         <a-button
           type="primary"
           id="pushOrderManagement-print-save"
-          v-if="!hasNoPrint&&nowType=='print'"
+          v-if="!hasNoPrint&&nowType=='print'&&$hasPermissions('B_dispatchTypePrint')"
           @click="handleSave('print')"
           style="margin-left: 10px;">确定打印</a-button>
         <a-button