|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<by-bill ref="bill" :propConfig="config" @search="search" @onSmt="onSmt" @onDelete="onDelete" @onRefresh="resert"
|
|
|
@resert="resert" @detail="openEdit" @onSave="onSave" @clickTab="clickTab" @onChangeRow="onChangeRow"
|
|
|
- @pagination="pagination" @onReturnSmt="onReturnSmt2" @getSupplierModal="getSupplierModal">
|
|
|
+ @pagination="pagination" @onReturnSmt="onReturnSmt2" @getSupplierModal="getSupplierModal" @printBefore="printBefore">
|
|
|
</by-bill>
|
|
|
|
|
|
<SettingConfig ref="setForm" type="setCForm" title="出库单" />
|
|
@@ -16,8 +16,9 @@
|
|
|
import towInOne from "../warehousing/components/towInOne.vue";
|
|
|
import stockLook from "./components/stockLook.vue";
|
|
|
import SettingConfig from "../saleOrder/components/settingConfig.vue";
|
|
|
+ import { add } from '@/benyun/utils/accuracy'
|
|
|
@Component({ components: { SettingConfig } })
|
|
|
- export default class OrderTask extends Vue {
|
|
|
+ export default class Outbound extends Vue {
|
|
|
// 左边
|
|
|
tabType : any = 'all';
|
|
|
isAdd : any = false;
|
|
@@ -796,6 +797,58 @@
|
|
|
this.getDataList()
|
|
|
}, 500)
|
|
|
}
|
|
|
+ //打印前数据修改
|
|
|
+ printBefore(params:any){
|
|
|
+ params.templateId = 12;
|
|
|
+ let value = (this.$refs.bill as any).getBillFormValue();
|
|
|
+ if(value){
|
|
|
+ let data:any={};
|
|
|
+ data.orderNumber = value.orderNumber;
|
|
|
+ data.operator = value.operator;
|
|
|
+ data.businessType = value.businessType;
|
|
|
+ data.financeOrderId = value.financeOrderId;
|
|
|
+ data.wmsId = value.wmsId;
|
|
|
+ data.remark = value.remark;
|
|
|
+ data.receivePhone = value.receivePhone;
|
|
|
+ data.receiveAddress = value.receiveAddress;
|
|
|
+ data.outOrderNo = value.outOrderNo;
|
|
|
+ data.receive = value.receive;
|
|
|
+ data.suborderList = [];
|
|
|
+ if(value.suborderList){
|
|
|
+ data.totalNumber = 0;//总数量
|
|
|
+ data.totalDeliveryNumber=0; //总应出数量
|
|
|
+ data.totalPri = 0;//总计金额
|
|
|
+ data.totalOutNumber = 0; //总出库数量
|
|
|
+ for(const item of value.suborderList){
|
|
|
+ let obj:any={};
|
|
|
+ obj.materialName = item.materialName;
|
|
|
+ obj.financeSuborderId = item.financeSuborderId;
|
|
|
+ obj.storehouseName = item.storehouseName;
|
|
|
+ obj.storingLocationName = item.storingLocationName;
|
|
|
+ obj.number = item.number;
|
|
|
+ obj.deliveryNumber = item.deliveryNumber;
|
|
|
+ obj.outNumber = item.outNumber;
|
|
|
+ obj.prePrice = item.prePrice;
|
|
|
+ obj.unitPrice = item.unitPrice;
|
|
|
+ obj.totalPrice = item.totalPrice;
|
|
|
+ data.suborderList.push(obj);
|
|
|
+ if(Number(item.number)){
|
|
|
+ data.totalNumber = add(data.totalNumber,Number(item.number))
|
|
|
+ }
|
|
|
+ if(Number(item.deliveryNumber)){
|
|
|
+ data.totalDeliveryNumber = add(data.totalDeliveryNumber,Number(item.deliveryNumber))
|
|
|
+ }
|
|
|
+ if(Number(item.totalPrice)){
|
|
|
+ data.totalPri = add(data.totalPri,Number(item.totalPrice));
|
|
|
+ }
|
|
|
+ if(Number(item.outNumber)){
|
|
|
+ data.totalOutNumber = add(data.totalOutNumber,Number(item.outNumber));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ params.templateData = data;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 参数配置
|
|
|
configuration() {
|
|
|
(this as any).$refs.setForm.openSetting();
|
|
@@ -957,7 +1010,6 @@
|
|
|
api.single({ id: e.id }, 'supplyOutOrder').then((res : any) => {
|
|
|
if (res.code === 200) {
|
|
|
let parentData = res.data ? res.data : e;
|
|
|
- console.log('编辑 ==>', parentData);
|
|
|
this.baseInfo = parentData;
|
|
|
if (this.tabType === 'all' || this.tabType === 'draftsBox') {
|
|
|
if (parentData.submitState === 1) {
|
|
@@ -1035,7 +1087,7 @@
|
|
|
readonly.form.attr.readonly = true; // 设置只读
|
|
|
readonly.tool.tools = {};
|
|
|
if (this.tabType != 'recycleBin') {
|
|
|
- if (parentData.submitState === 1) readonly.tool.tools = { returnSmt: true };
|
|
|
+ if (parentData.submitState === 1) readonly.tool.tools = { returnSmt: true,print:true };
|
|
|
}
|
|
|
readonly.tableConfig[0].table.columns = readonly.tableConfig[0].table.columns.filter((v : any) => v.title != '操作');
|
|
|
api.single({ id: e.purchaseOrderId }, 'supplyPurchaseOrder').then((val : any) => {
|
|
@@ -1352,7 +1404,6 @@
|
|
|
}
|
|
|
// 工具栏删除
|
|
|
onDelete(e : any) {
|
|
|
- console.log('工具栏删除 ==> ', e);
|
|
|
let selectData = (this.$refs.bill as any).getTableSelectData(e)
|
|
|
let ids = '';
|
|
|
if (selectData.length > 0) {
|