Parcourir la source

Merge branch 'develop_yh11' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh11

lilei il y a 2 ans
Parent
commit
6c1db07a86

+ 8 - 0
src/api/allocateBill.js

@@ -203,3 +203,11 @@ export const allocateBillDetailExcel = (params) => {
     responseType: 'blob'
   })
 }
+//  调拨 列表  更改(暂不打印、取消打印)打印状态
+export const updatePrintState = params => {
+  return axios({
+    url: '/allocateBill/updatePrintState',
+    data: params,
+    method: 'post'
+  })
+}

+ 27 - 19
src/views/allocationManagement/transferOut/list.vue

@@ -124,8 +124,11 @@
         </template>
         <!-- 打印状态 -->
         <template slot="printStateWord" slot-scope="text, record">
-            <span v-if="record.printState=='NO_PRINT'||record.printState=='PRINT'">{{record.printStateDictValue}}</span>
-            <span @click="handlePrint(record)" class="link-bule" v-else>{{record.printStateDictValue}}</span>
+          <span v-if="record.printState">
+            <span v-if="record.printState=='NO_PRINT'||record.printState=='PRINT'">{{ record.printStateDictValue }}</span>
+            <span @click="handlePrint(record)" class="link-bule" v-else>{{ record.printStateDictValue }}</span>
+          </span>
+          <span v-else>--</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -171,8 +174,8 @@
       @close="visibleAudit=false"
       @ok="auditOrder('WAIT_OUT_WAREHOUSE')"
       @fail="auditOrder('AUDIT_REJECT')" />
-      <!-- 打印状态 -->
-      <printModal v-drag :show="printIsShow" :info="printInfo" @cancel="printIsShow=false"></printModal>
+    <!-- 打印状态 -->
+    <printModal v-drag :show="printIsShow" :info="printInfo" @cancel="cancelModal"></printModal>
   </a-card>
 </template>
 
@@ -192,7 +195,7 @@ import printModal from './printStatusModal.vue'
 export default {
   name: 'TransferOutList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, printModal,rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
+  components: { STable, VSelect, basicInfoModal, printModal, rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -218,7 +221,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      printIsShow:false,
+      printIsShow: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -240,12 +243,12 @@ export default {
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false,
-      openModal: false ,//  新增编辑  弹框
-      printInfo:null
+      openModal: false, //  新增编辑  弹框
+      printInfo: null
     }
   },
   computed: {
-    // dataIndex: 'printStateDictValue', 
+    // dataIndex: 'printStateDictValue',
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
@@ -262,7 +265,7 @@ export default {
         { title: '费用类型', dataIndex: 'costTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', scopedSlots: { customRender: 'allocateType' }, width: '6%', align: 'center' },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', scopedSlots: { customRender: 'printStateWord' },width: '6%', align: 'center' },
+        { title: '打印状态', scopedSlots: { customRender: 'printStateWord' }, width: '6%', align: 'center' },
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -278,6 +281,11 @@ export default {
     }
   },
   methods: {
+    // 关闭打印状态弹窗
+    cancelModal () {
+      this.printIsShow = false
+      this.$refs.table.refresh(true)
+    },
     custChange (val) {
       this.queryParam.receiverSn = val.key || ''
       // this.queryParam.receiverName = val.name || ''
@@ -410,16 +418,16 @@ export default {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 238
     },
-    handlePrint(item){
-      let obj={
-        no:item.allocateNo,
-        targetName:item.targetName,
-        id:item.id,
-        printState:item.printState  
+    handlePrint (item) {
+      const obj = {
+        no: item.allocateNo,
+        targetName: item.targetName,
+        allocateSn: item.allocateSn,
+        printState: item.printState
       }
-      this.printInfo=obj;
-      this.$nextTick(()=>{
-         this.printIsShow = true
+      this.printInfo = obj
+      this.$nextTick(() => {
+        this.printIsShow = true
       })
     }
   },

+ 20 - 12
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :footer="null"
     @cancel="cancel"
-    width="30%">
+    width="40%">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
         id="chooseCustom-form"
@@ -14,16 +14,16 @@
         :model="form"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
+        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
         </a-form-model-item>
         <a-form-model-item label="调往对象:" prop="targetName"> <span>{{ form.targetName }}</span>
         </a-form-model-item>
         <a-form-model-item label="调拨打印:" prop="printState">
-          <a-radio-group v-model="form.printState">
+          <a-radio-group v-model="printState">
             <a-radio value="NO_PRINT">
               允许打印
             </a-radio>
-            <a-radio value="CANCEL_PRINT">
+            <a-radio value="CANCEL_PRINT" v-if="form.printState=='UNABLE_PRINT'">
               取消打印
             </a-radio>
           </a-radio-group>
@@ -40,8 +40,8 @@
 
 <script>
 import {
-  updateFinanceBookDetail
-} from '@/api/financeBook.js'
+  updatePrintState
+} from '@/api/allocateBill.js'
 export default {
   name: 'PrintModal',
   props: {
@@ -72,9 +72,9 @@ export default {
         no: undefined,
         payerName: undefined,
         printStatus: '',
-        id: '',
-        type: undefined
-      }
+        allocateSn: ''
+      },
+      printState: ''
     }
   },
   methods: {
@@ -82,12 +82,12 @@ export default {
     handleSubmit () {
       const _this = this
       const ajax_form = {
-        id: this.form.id,
-        printStatus: this.form.printStatus
+        allocateSn: this.form.allocateSn,
+        printState: this.printState
       }
       _this.spinning = true
       _this.confirmLoading = true
-      updateFinanceBookDetail(ajax_form).then(res => {
+      updatePrintState(ajax_form).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.cancel()
@@ -101,6 +101,7 @@ export default {
     cancel () {
       this.opened = false
       this.$emit('cancel')
+      this.printState = ''
       this.$refs.ruleForm.resetFields()
     }
   },
@@ -116,3 +117,10 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+#chooseCustom-form{
+.chooseCustom-form{
+  margin-bottom:0 !important;
+}
+}
+</style>

+ 34 - 22
src/views/allocationManagement/transfersPrint/list.vue

@@ -106,7 +106,7 @@
           </template>
           <!-- 打印状态 -->
           <template slot="printStatus" slot-scope="text, record">
-            <span v-if="record.printState=='NO_PRINT'" class="link-bule" @click="handlePrint(record)">{{ record.printStateDictValue }}</span>
+            <span v-if="record.printState=='NO_PRINT'" class="link-bule" @click="editPrintStatus(record)">{{ record.printStateDictValue }}</span>
             <span v-else>{{ record.printStateDictValue }}</span>
           </template>
           <div slot="costTitle">
@@ -153,8 +153,8 @@
       <div style="text-align: center;">
         <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
         <div style="line-height: 24px;">
-          <div>收款单号:{{ tipData&&tipData.bookNo }}</div>
-          <div>客户名称:{{ tipData&&tipData.payerName }}</div>
+          <div>调拨单号:{{ tipData&&tipData.allocateNo }}</div>
+          <div>调往对象:{{ tipData&&tipData.targetName }}</div>
         </div>
       </div>
     </commonModal>
@@ -173,12 +173,12 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
 import recordModal from './recordModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
-import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
+import { allocateBillList, allocateBillDetailPrint, updatePrintState } from '@/api/allocateBill'
 import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal,commonModal, recordModal, subarea, Area },
+  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal, commonModal, recordModal, subarea, Area },
   data () {
     return {
       spinning: false,
@@ -186,7 +186,7 @@ export default {
       tableHeight: 0,
       itemData: null,
       showRecordModal: false,
-      showPrintModal:false,
+      showPrintModal: false,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -225,9 +225,8 @@ export default {
         })
       },
       visibleAudit: false,
-      auditInfo: null,
-      spinningAudit: false,
-      openModal: false //  打印弹框
+      openModal: false, //  打印弹框
+      tipData: null
     }
   },
   computed: {
@@ -301,19 +300,6 @@ export default {
         billSn: row.allocateSn
       })
     },
-    //状态打印弹窗
-    handlePrint(item){
-      let obj={
-        no:item.allocateNo,
-        targetName:item.targetName,
-        id:item.id,
-        printState:item.printState  
-      }
-      this.printInfo=obj;
-      this.$nextTick(()=>{
-         this.printIsShow = true
-      })
-    },
     // 确定打印
     handleOk (objs) {
       const _this = this
@@ -354,6 +340,32 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240
+    },
+    // 状态打印弹窗
+    editPrintStatus (item) {
+      this.tipData = item
+      this.$nextTick(() => {
+        this.showPrintModal = true
+      })
+    },
+    canselModal () {
+      this.showPrintModal = false
+      this.resetSearchForm()
+    },
+    updatePrintStatus () {
+      const _this = this
+      _this.spinning = true
+      const ajax_data = {
+        allocateSn: _this.tipData.allocateSn,
+        printState: 'UNABLE_PRINT'
+      }
+      updatePrintState(ajax_data).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.canselModal()
+        }
+        _this.spinning = false
+      })
     }
   },
   watch: {

+ 7 - 9
src/views/salesManagement/salesCollection/detailModal.vue

@@ -42,27 +42,27 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="收款单号">
                   <a-input v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="财务收款事由">
                   <a-input v-model.trim="queryParam.bookReason" allowClear placeholder="请输入财务收款事由"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="申请人">
                   <employee style="width: 100%;" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="申请时间">
                   <rangeDate ref="rangeApply" :value="applyDate" @change="dateApplyChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -156,10 +156,7 @@ export default {
       spinning: false,
       showDetailModal: false,
       handlePlData: [],
-      applyDate: [
-        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ],
+      applyDate: [],
       queryParam: {
         bookNo: '',
         bookReason: '',
@@ -287,6 +284,7 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
+      this.$refs.rangeApply.resetDate()
       this.$refs.table.refresh(true)
     }
   },