修改请购单的页面

This commit is contained in:
jishenghua
2024-04-20 22:46:15 +08:00
parent e6456acdb6
commit 870c41aa4a
4 changed files with 81 additions and 28 deletions

View File

@@ -119,7 +119,7 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '采购订', prefixNo)">查看</a> <a @click="myHandleDetail(record, '请购', prefixNo)">查看</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
@@ -206,7 +206,6 @@
return text return text
} }
}, },
{ title: '关联订单', dataIndex: 'linkNumber',width:180},
{ title: '商品信息', dataIndex: 'materialsList',width:320, ellipsis:true}, { title: '商品信息', dataIndex: 'materialsList',width:320, ellipsis:true},
{ title: '单据日期', dataIndex: 'operTimeStr',width:185}, { title: '单据日期', dataIndex: 'operTimeStr',width:185},
{ title: '操作员', dataIndex: 'userName',width:120, ellipsis:true}, { title: '操作员', dataIndex: 'userName',width:120, ellipsis:true},

View File

@@ -14,6 +14,7 @@
<!--此处为解决缓存问题--> <!--此处为解决缓存问题-->
<a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'">普通打印</a-button> <a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'">普通打印</a-button>
<a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'">普通打印</a-button> <a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'">普通打印</a-button>
<a-button v-if="billType === '请购单'" v-print="'#purchaseApplyPrint'">普通打印</a-button>
<a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'">普通打印</a-button> <a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'">普通打印</a-button>
<a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'">普通打印</a-button> <a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'">普通打印</a-button>
<a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'">普通打印</a-button> <a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'">普通打印</a-button>
@@ -28,6 +29,7 @@
<a-button v-if="billType === '盘点复盘'" v-print="'#stockCheckReplayPrint'">普通打印</a-button> <a-button v-if="billType === '盘点复盘'" v-print="'#stockCheckReplayPrint'">普通打印</a-button>
<!--导出Excel--> <!--导出Excel-->
<a-button v-if="billType === '零售出库'||billType === '零售退货入库'" @click="retailExportExcel()">导出</a-button> <a-button v-if="billType === '零售出库'||billType === '零售退货入库'" @click="retailExportExcel()">导出</a-button>
<a-button v-if="billType === '请购单'" @click="applyExportExcel()">导出</a-button>
<a-button v-if="billType === '采购订单'||billType === '销售订单'" @click="orderExportExcel()">导出</a-button> <a-button v-if="billType === '采购订单'||billType === '销售订单'" @click="orderExportExcel()">导出</a-button>
<a-button v-if="billType === '采购入库'||billType === '采购退货出库'||billType === '销售出库'||billType === '销售退货入库'" <a-button v-if="billType === '采购入库'||billType === '采购退货出库'||billType === '销售出库'||billType === '销售退货入库'"
@click="purchaseSaleExportExcel()">导出</a-button> @click="purchaseSaleExportExcel()">导出</a-button>
@@ -211,6 +213,53 @@
</a-row> </a-row>
</section> </section>
</template> </template>
<!--请购单-->
<template v-else-if="billType === '请购单'">
<section ref="print" id="purchaseApplyPrint">
<a-row class="form-row" :gutter="24">
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
{{model.operTimeStr}}
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
{{model.number}}
</a-form-item>
</a-col>
<a-col :span="6">
</a-col>
<a-col :span="6">
</a-col>
</a-row>
<div :style="tableWidth">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:pagination="false"
:loading="loading"
:columns="columns"
:dataSource="dataSource">
<template slot="customBarCode" slot-scope="text, record">
<div :style="record.imgName?'float:left;line-height:30px':'float:left;'">{{record.barCode}}</div>
<a-popover placement="right" trigger="click">
<template slot="content"><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px" /></template>
<div class="item-info" v-if="record.imgName"><img v-if="record.imgName" :src="getImgUrl(record.imgName, record.imgSmall)" class="item-img" title="查看大图" /></div>
</a-popover>
</template>
</a-table>
</div>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="" style="padding:20px 10px;">
{{model.remark}}
</a-form-item>
</a-col>
</a-row>
</section>
</template>
<!--采购订单--> <!--采购订单-->
<template v-else-if="billType === '采购订单'"> <template v-else-if="billType === '采购订单'">
<section ref="print" id="purchaseOrderPrint"> <section ref="print" id="purchaseOrderPrint">
@@ -1222,6 +1271,19 @@
{ title: '仓位货架', dataIndex: 'position'}, { title: '仓位货架', dataIndex: 'position'},
{ title: '备注', dataIndex: 'remark'} { title: '备注', dataIndex: 'remark'}
], ],
purchaseApplyColumns: [
{ title: '条码', dataIndex: 'barCode'},
{ title: '名称', dataIndex: 'name'},
{ title: '规格', dataIndex: 'standard'},
{ title: '型号', dataIndex: 'model'},
{ title: '颜色', dataIndex: 'color'},
{ title: '扩展信息', dataIndex: 'materialOther'},
{ title: '单位', dataIndex: 'unit'},
{ title: '多属性', dataIndex: 'sku'},
{ title: '数量', dataIndex: 'operNumber'},
{ title: '已采购', dataIndex: 'finishNumber'},
{ title: '备注', dataIndex: 'remark'}
],
purchaseOrderColumns: [ purchaseOrderColumns: [
{ title: '条码', dataIndex: 'barCode'}, { title: '条码', dataIndex: 'barCode'},
{ title: '名称', dataIndex: 'name'}, { title: '名称', dataIndex: 'name'},
@@ -1488,6 +1550,8 @@
this.defColumns = this.retailOutColumns this.defColumns = this.retailOutColumns
} else if (type === '零售退货入库') { } else if (type === '零售退货入库') {
this.defColumns = this.retailBackColumns this.defColumns = this.retailBackColumns
} else if (type === '请购单') {
this.defColumns = this.purchaseApplyColumns
} else if (type === '采购订单') { } else if (type === '采购订单') {
this.defColumns = this.purchaseOrderColumns this.defColumns = this.purchaseOrderColumns
} else if (type === '采购入库') { } else if (type === '采购入库') {
@@ -1774,6 +1838,20 @@
let tip = organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number let tip = organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list) exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
}, },
//请购单
applyExportExcel() {
let list = []
let head = '条码,名称,规格,型号,颜色,扩展信息,单位,多属性,原数量,已采购,数量,备注'
for (let i = 0; i < this.dataSource.length; i++) {
let item = []
let ds = this.dataSource[i]
item.push(ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.unit, ds.sku,
ds.preNumber, ds.finishNumber, ds.operNumber, ds.remark)
list.push(item)
}
let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
},
//采购订单|销售订单 //采购订单|销售订单
orderExportExcel() { orderExportExcel() {
let list = [] let list = []

View File

@@ -20,7 +20,7 @@
<!-- 搜索区域 --> <!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="4" :sm="24"> <a-col :md="4" :sm="24" v-if="organLabel">
<a-form-item :label="organLabel" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}"> <a-form-item :label="organLabel" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-select v-model="queryParam.organId" :dropdownMatchSelectWidth="false" showSearch optionFilterProp="children"> <a-select v-model="queryParam.organId" :dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
<a-select-option v-for="(item,index) in supplierList" :key="index" :value="item.id"> <a-select-option v-for="(item,index) in supplierList" :key="index" :value="item.id">

View File

@@ -90,28 +90,19 @@
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal> <import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import ManyAccountModal from '../dialog/ManyAccountModal'
import ImportItemModal from '../dialog/ImportItemModal' import ImportItemModal from '../dialog/ImportItemModal'
import LinkBillList from '../dialog/LinkBillList'
import VendorModal from '../../system/modules/VendorModal'
import AccountModal from '../../system/modules/AccountModal'
import HistoryBillList from '../dialog/HistoryBillList' import HistoryBillList from '../dialog/HistoryBillList'
import WorkflowIframe from '@/components/tools/WorkflowIframe' import WorkflowIframe from '@/components/tools/WorkflowIframe'
import { FormTypes } from '@/utils/JEditableTableUtil' import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin' import { BillModalMixin } from '../mixins/BillModalMixin'
import { getCurrentSystemConfig } from '@/api/api'
import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util" import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util"
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
@@ -120,11 +111,7 @@
name: "PurchaseApplyModal", name: "PurchaseApplyModal",
mixins: [JEditableTableMixin,BillModalMixin], mixins: [JEditableTableMixin,BillModalMixin],
components: { components: {
ManyAccountModal,
ImportItemModal, ImportItemModal,
LinkBillList,
VendorModal,
AccountModal,
HistoryBillList, HistoryBillList,
WorkflowIframe, WorkflowIframe,
JUpload, JUpload,
@@ -239,8 +226,7 @@
} }
this.fileList = this.model.fileName this.fileList = this.model.fileName
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark', this.form.setFieldsValue(pick(this.model, 'operTime', 'number', 'remark'))
'discount','discountMoney','discountLastMoney','accountId','changeAmount'))
}); });
// 加载子表数据 // 加载子表数据
let params = { let params = {
@@ -258,8 +244,6 @@
this.copyAddInit(this.prefixNo) this.copyAddInit(this.prefixNo)
} }
this.initSystemConfig() this.initSystemConfig()
this.initSupplier()
this.initAccount()
}, },
/** 整理成formData */ /** 整理成formData */
classifyIntoFormData(allValues) { classifyIntoFormData(allValues) {
@@ -270,17 +254,9 @@
billMain.subType = '请购单' billMain.subType = '请购单'
billMain.defaultNumber = billMain.number billMain.defaultNumber = billMain.number
for(let item of detailArr){ for(let item of detailArr){
item.depotId = '' //订单不需要仓库
totalPrice += item.allPrice-0 totalPrice += item.allPrice-0
} }
billMain.totalPrice = 0-totalPrice billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount
if(billMain.accountId === 0) {
billMain.accountId = ''
}
this.accountMoneyList = changeListFmtMinus(this.accountMoneyList)
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
if(this.fileList && this.fileList.length > 0) { if(this.fileList && this.fileList.length > 0) {
billMain.fileName = this.fileList billMain.fileName = this.fileList
} else { } else {