lilei 2 vuotta sitten
vanhempi
commit
3957a57585

+ 7 - 3
src/libs/JGPrint.js

@@ -137,7 +137,7 @@ export const jGPrint = function (data, type, callback, printLogParams,printPageS
 }
 
 // 打印
-export const printFun = function(url,params,type,taskName,callback,printLogParams){
+export const printFun = function(url,params,type,taskName,callback,printLogParams,hidePrint){
   url(params).then(res => {
     if (res.type == 'application/json') {
       var reader = new FileReader()
@@ -151,7 +151,7 @@ export const printFun = function(url,params,type,taskName,callback,printLogParam
       reader.readAsText(res)
     } else {
        console.log(res,'printFun')
-       jGPrintPdf(res,type,taskName,printLogParams,callback)
+       jGPrintPdf(res,type,taskName,printLogParams,callback,hidePrint)
     }
   })
 }
@@ -172,7 +172,7 @@ export const printLog = function(data,callback){
   })
 }
 // 打印pdf
-export const jGPrintPdf = function (data, type, taskName, printLogParams,callback) {
+export const jGPrintPdf = function (data, type, taskName, printLogParams,callback,hidePrint) {
     if (!data) {
       return
     }
@@ -201,6 +201,10 @@ export const jGPrintPdf = function (data, type, taskName, printLogParams,callbac
       LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
       //执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
       LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS",true);
+      // 隐藏打印按钮
+      if(hidePrint){
+        LODOP.SET_SHOW_MODE("HIDE_PBUTTIN_PREVIEW",true);
+      }
       //TaskID:任务id,Value:job代码
       LODOP.On_Return=function(TaskID,Value){
          console.log(TaskID,Value)

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

@@ -5,7 +5,7 @@
         <template slot="subTitle" v-if="!outBizSubSn&&!bizSn">
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
         </template>
-        <template slot="extra" v-if="$hasPermissions('B_dispatchPrint')&&detailData&&detailData.printStatus!='UNABLE_PRINT'">
+        <template slot="extra" v-if="$hasPermissions('B_dispatchPrint')">
           <a-button
             key="3"
             type="primary"
@@ -250,7 +250,7 @@ export default {
           billSn: obj.dispatchBillSn,
           billNo: obj.dispatchBillNo,
           printType: taskName + '打印'
-        })
+        }, this.detailData.printStatus == 'UNABLE_PRINT')
     }
   },
   mounted () {

+ 5 - 15
src/views/salesReturnManagement/billOfLading/add.vue

@@ -36,8 +36,7 @@
                 <logisticsCompany
                   id="billOfLadingEdit-logisticsCompany"
                   ref="logisticsCompany"
-                  @change="ltcChange"
-                  v-model="form.logisticsCompany"
+                  v-model.trim="form.logisticsCompany"
                 />
               </a-form-model-item>
             </a-col>
@@ -45,7 +44,6 @@
               <a-form-model-item label="物流点">
                 <logisticsPoint
                   ref="logisticsPoint"
-                  :defLoad="false"
                   id="billOfLadingEdit-logisticsPoint"
                   v-model.trim="form.logisticsPoint"
                   allowClear />
@@ -264,14 +262,6 @@ export default {
     openSelModal () {
       this.showXtModal = true
     },
-    ltcChange (v, row) {
-      if (row) {
-        this.$refs.logisticsPoint.getList(row.logisticsPointList)
-      } else {
-        this.$refs.logisticsPoint.clearData()
-      }
-      this.form.logisticsPoint = undefined
-    },
     // 关联销售退货单
     getReturnOrderList () {
       pickUpDetailQueryList({ pickUpSn: this.$route.params.sn }).then(res => {
@@ -298,10 +288,10 @@ export default {
             this.$refs.dealerSubareaScopeList.getDetail(this.form.senderSn)
           }
           // 物流点
-          if (this.form.logisticsPoint) {
-            const point = this.$refs.logisticsCompany.getPoint(this.form.logisticsCompany)
-            this.$refs.logisticsPoint.getList(point)
-          }
+          // if (this.form.logisticsPoint) {
+          //   const point = this.$refs.logisticsCompany.getPoint(this.form.logisticsCompany)
+          //   this.$refs.logisticsPoint.getList(point)
+          // }
         } else {
           this.$refs.ruleForm.resetFields()
         }

+ 1 - 3
src/views/salesReturnManagement/billOfLading/list.vue

@@ -28,7 +28,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="物流点">
-                  <logisticsPoint style="width: 100%;" id="billOfLading-logisticsPoint" v-model="queryParam.logisticsPoint"></logisticsPoint>
+                  <a-input id="billOfLading-logisticsPoint" v-model.trim="queryParam.logisticsPoint" allowClear placeholder="请输入物流点"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -141,7 +141,6 @@ import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import verifyModal from './verifyModal.vue'
-import logisticsPoint from './logisticsPoint'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { pickUpQueryPage, pickUpDelete, pickUpAgainEdit } from '@/api/pickUp'
 export default {
@@ -153,7 +152,6 @@ export default {
     dealerSubareaScopeList,
     employee,
     rangeDate,
-    logisticsPoint,
     verifyModal
   },
   data () {

+ 22 - 17
src/views/salesReturnManagement/billOfLading/logisticsCompany.js

@@ -1,19 +1,19 @@
 import { pickUpLogisticsList } from '@/api/pickUp'
 const LogisticsCompany = {
   template: `
-      <a-select
-        :placeholder="placeholder"
-        :id="id"
-        allowClear
-        :value="defaultVal"
-        :showSearch="true"
-        @change="handleChange"
-        option-filter-prop="children"
-        :filter-option="filterOption">
-        <a-select-option v-for="item in list" :key="item.id" :value="item.logisticsCompany">
-        {{ item.logisticsCompany }}
-        </a-select-option>
-      </a-select>
+       <a-input-group compact :id="id">
+        <a-input style="width: 70%" allowClear @change="handleChange" :placeholder="placeholder" :value="defaultVal"/>
+        <a-select
+          style="width: 30%"
+          @change="changeSel"
+          placeholder="选择物流公司"
+          option-filter-prop="children"
+          :filter-option="filterOption">
+          <a-select-option v-for="item in list" :key="item.id" :value="item.logisticsCompany">
+          {{ item.logisticsCompany }}
+          </a-select-option>
+        </a-select>
+      </a-input-group>
     `,
   props: {
     value: {
@@ -26,7 +26,7 @@ const LogisticsCompany = {
     },
     placeholder: {
       type: String,
-      default: '请选择物流公司'
+      default: '请输入物流公司'
     },
   },
   data() {
@@ -49,10 +49,15 @@ const LogisticsCompany = {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    handleChange(value) {
+    changeSel(value){
       this.defaultVal = value;
-      const row = this.list.find(item => item.logisticsCompany == value)
-      this.$emit('change', value, row);
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+    handleChange(e) {
+      const value = e.target.value
+      this.defaultVal = value;
+      this.$emit('change', value);
       this.$emit('input', value);
     },
     getList () {

+ 21 - 15
src/views/salesReturnManagement/billOfLading/logisticsPoint.js

@@ -1,19 +1,19 @@
 import { pickUpPointList } from '@/api/pickUp'
 const LogisticsPoint = {
   template: `
-      <a-select
-        :placeholder="placeholder"
-        :id="id"
-        allowClear
-        :value="defaultVal"
-        :showSearch="true"
-        @change="handleChange"
-        option-filter-prop="children"
-        :filter-option="filterOption">
-        <a-select-option v-for="item in list" :key="item" :value="item">
-        {{ item }}
-        </a-select-option>
-      </a-select>
+      <a-input-group compact :id="id">
+        <a-input style="width: 70%" allowClear @change="handleChange" :placeholder="placeholder" :value="defaultVal"/>
+        <a-select
+          style="width: 30%"
+          @change="changeSel"
+          placeholder="选择物流点"
+          option-filter-prop="children"
+          :filter-option="filterOption">
+          <a-select-option v-for="item in list" :key="item" :value="item">
+          {{ item }}
+          </a-select-option>
+        </a-select>
+      </a-input-group>
     `,
   props: {
     value: {
@@ -26,7 +26,7 @@ const LogisticsPoint = {
     },
     placeholder: {
       type: String,
-      default: '请选择物流点'
+      default: '请输入物流点'
     },
     defLoad:{
       type: Boolean,
@@ -55,7 +55,13 @@ const LogisticsPoint = {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    handleChange(value) {
+    changeSel(value) {
+      this.defaultVal = value;
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+    handleChange(e) {
+      const value = e.target.value
       this.defaultVal = value;
       this.$emit('change', value);
       this.$emit('input', value);