Browse Source

添加调拨打印状态弹窗

liujun 2 năm trước cách đây
mục cha
commit
3620ab8e3b

+ 26 - 3
src/views/allocationManagement/transferOut/list.vue

@@ -122,6 +122,11 @@
             <span v-if="record.allocateTypeName">{{ record.allocateTypeName }}</span>
           </div>
         </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>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -166,6 +171,8 @@
       @close="visibleAudit=false"
       @ok="auditOrder('WAIT_OUT_WAREHOUSE')"
       @fail="auditOrder('AUDIT_REJECT')" />
+      <!-- 打印状态 -->
+      <printModal v-drag :show="printIsShow" :info="printInfo" @cancel="printIsShow=false"></printModal>
   </a-card>
 </template>
 
@@ -181,10 +188,11 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport, allocateBillAblePrint } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
+import printModal from './printStatusModal.vue'
 export default {
   name: 'TransferOutList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
+  components: { STable, VSelect, basicInfoModal, printModal,rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -210,6 +218,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      printIsShow:false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -231,10 +240,12 @@ export default {
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false,
-      openModal: false //  新增编辑  弹框
+      openModal: false ,//  新增编辑  弹框
+      printInfo:null
     }
   },
   computed: {
+    // dataIndex: 'printStateDictValue', 
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
@@ -251,7 +262,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: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { 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' }
@@ -398,6 +409,18 @@ export default {
     setTableH () {
       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  
+      }
+      this.printInfo=obj;
+      this.$nextTick(()=>{
+         this.printIsShow = true
+      })
     }
   },
   watch: {

+ 107 - 0
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -0,0 +1,107 @@
+<template>
+  <a-modal v-model="opened" :title="title" centered :maskClosable="false" :footer="null" @cancel="cancel" width="50%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model id="chooseCustom-form" ref="ruleForm" :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>
+        <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 value="NO_PRINT">
+                允许打印
+              </a-radio>
+              <a-radio value="CANCEL_PRINT">
+                取消打印
+              </a-radio>
+            </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import {
+    updateFinanceBookDetail
+  } from '@/api/financeBook.js'
+  export default {
+    name: 'PrintModal',
+    props: {
+      show: [Boolean],
+      info: {
+        type: Object,
+        default: () => {
+          return null
+        }
+      }
+    },
+    data() {
+      return {
+        opened: this.show,
+        spinning: false,
+        title: '调拨打印状态',
+
+        confirmLoading: false,
+        formItemLayout: {
+          labelCol: {
+            span: 6
+          },
+          wrapperCol: {
+            span: 18
+          }
+        },
+        form: {
+          no: undefined,
+          payerName: undefined,
+          printStatus:'',
+          id:'',
+          type:undefined
+        }
+      }
+    },
+    methods: {
+      //  保存
+      handleSubmit() {
+       const _this = this
+       const ajax_form = {
+         id:this.form.id,
+         printStatus:this.form.printStatus  
+       }
+       _this.spinning = true
+       _this.confirmLoading = true
+       updateFinanceBookDetail(ajax_form).then(res => {
+         if (res.status == 200) {
+           _this.$message.success(res.message)
+           _this.cancel()
+           _this.spinning = false
+         } else {
+           _this.spinning = false
+         }
+         _this.confirmLoading = false
+       })
+      },
+      cancel() {
+        this.opened = false
+        this.$emit('cancel')
+        this.$refs.ruleForm.resetFields()
+      }
+    },
+    watch: {
+      show(newValue, oldValue) {
+        this.opened = newValue
+        if (!newValue) {
+         this.cancel();
+        }else{
+           this.form = this.info
+        }
+      }
+    }
+  }
+</script>

+ 24 - 2
src/views/allocationManagement/transfersPrint/list.vue

@@ -104,6 +104,11 @@
             <span v-if="$hasPermissions('M_tfoPrint_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
             <span v-else>{{ record.allocateNo }}</span>
           </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-else>{{ record.printStateDictValue }}</span>
+          </template>
           <div slot="costTitle">
             <a-tooltip placement="top">
               <template slot="title">
@@ -143,6 +148,8 @@
       @close="openModal=false" />
     <!-- 打印记录 -->
     <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
+    <!-- 调拨打印 -->
+    <printModalTip v-drag :show="printIsShow" :info="printInfo" @cancel="printIsShow=false"></printModalTip>
   </div>
 </template>
 
@@ -157,12 +164,13 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
 import recordModal from './recordModal.vue'
+import printModalTip from './printModal.vue'
 import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
 import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal, recordModal, subarea, Area },
+  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal,printModalTip, recordModal, subarea, Area },
   data () {
     return {
       spinning: false,
@@ -170,6 +178,7 @@ export default {
       tableHeight: 0,
       itemData: null,
       showRecordModal: false,
+      printIsShow:false,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -228,7 +237,7 @@ export default {
         // { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', scopedSlots: { customRender: 'printStatus' }, width: '6%', align: 'center' },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -284,6 +293,19 @@ 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

+ 98 - 0
src/views/allocationManagement/transfersPrint/printModal.vue

@@ -0,0 +1,98 @@
+<template>
+  <a-modal v-model="opened" :title="title" centered :maskClosable="false" :footer="null" @cancel="cancel" width="50%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div>如需将打印状态退至【暂不打印】,请点击下方按钮</div>
+     <a-form-model id="chooseCustom-form" ref="ruleForm" :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>
+       <a-form-model-item label="调往对象:" prop="targetName"> <span>{{form.targetName}}</span>
+       </a-form-model-item>
+       <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+         <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+         <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">暂不打印
+         </a-button>
+       </a-form-model-item>
+     </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import {
+    updateFinanceBookDetail
+  } from '@/api/financeBook.js'
+  export default {
+    name: 'PrintModal',
+    props: {
+      show: [Boolean],
+      info: {
+        type: Object,
+        default: () => {
+          return null
+        }
+      }
+    },
+    data() {
+      return {
+        opened: this.show,
+        spinning: false,
+        title: '操作提示',
+
+        confirmLoading: false,
+        formItemLayout: {
+          labelCol: {
+            span: 6
+          },
+          wrapperCol: {
+            span: 18
+          }
+        },
+        form: {
+          no: undefined,
+          payerName: undefined,
+          printStatus:'',
+          id:'',
+          type:undefined
+        }
+      }
+    },
+    methods: {
+      //  保存
+      handleSubmit() {
+       const _this = this
+       const ajax_form = {
+         id:this.form.id,
+         printStatus:this.form.printStatus  
+       }
+       _this.spinning = true
+       _this.confirmLoading = true
+       updateFinanceBookDetail(ajax_form).then(res => {
+         if (res.status == 200) {
+           _this.$message.success(res.message)
+           _this.cancel()
+           _this.spinning = false
+         } else {
+           _this.spinning = false
+         }
+         _this.confirmLoading = false
+       })
+      },
+      cancel() {
+        this.opened = false
+        this.$emit('cancel')
+        this.$refs.ruleForm.resetFields()
+      }
+    },
+    watch: {
+      show(newValue, oldValue) {
+        this.opened = newValue
+        if (!newValue) {
+         this.cancel();
+        }else{
+           this.form = this.info
+        }
+      }
+    }
+  }
+</script>

+ 6 - 0
src/views/salesManagement/salesCollection/detailModal.vue

@@ -57,6 +57,11 @@
                   <employee style="width: 100%;" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="申请时间">
+                  <rangeDate ref="rangeApply" :value="settleDate" @change="dateSettleChange" />
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
@@ -160,6 +165,7 @@ export default {
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务收款事由', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '付款方', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },