单据类型,业务单据修改

master
anthonywj 3 years ago
parent 4308e3c464
commit 301a4a7dd5

@ -136,7 +136,7 @@
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
<div class="itemTag"> <div class="itemTag">
<span>补单单据类型:&nbsp;</span> <span>内部进出平衡补单:&nbsp;</span>
</div> </div>
<el-select :disabled="inputQuery.corpType !=1" <el-select :disabled="inputQuery.corpType !=1"
v-model="inputQuery.supplementOrderType" v-model="inputQuery.supplementOrderType"
@ -198,7 +198,7 @@
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="4" class="el-col"> <el-col :span="4" class="el-col">
<div class="text item"> <div class="text item">
<el-checkbox v-model="inputQuery.checkEnable">()</el-checkbox> <el-checkbox v-model="inputQuery.checkEnable" @change="oneCheck">()</el-checkbox>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -249,7 +249,9 @@
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="4" class="el-col"> <el-col :span="4" class="el-col">
<div class="text item"> <div class="text item">
<el-checkbox v-model="inputQuery.secCheckEnable">()</el-checkbox> <el-checkbox v-model="inputQuery.secCheckEnable"
:disabled="twoCheck">需要单据复核的来源类型(二次复核)
</el-checkbox>
</div> </div>
</el-col> </el-col>
@ -340,6 +342,7 @@ export default {
value: '2', value: '2',
label: '客户信息' label: '客户信息'
}], }],
twoCheck: false,
} }
}, },
@ -371,11 +374,20 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
oneCheck(type) {
console.log(type);
if (!type) {
this.twoCheck = true;
this.inputQuery.secCheckEnable = false;
}else
this.twoCheck = false;
},
// //
getOrderType() { getOrderType() {
this.orderTypeList = []; this.orderTypeList = [];
let query = { let query = {
mainAction: this.inputQuery.mainAction mainAction: this.inputQuery.mainAction,
curAction:this.inputQuery.supplementOrderType,
}; };
getCandidateBussinessType(query).then((response) => { getCandidateBussinessType(query).then((response) => {
this.orderTypeList = response.data || []; this.orderTypeList = response.data || [];

@ -118,6 +118,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
invQueryData:{
type: Object,
required: true,
}
}, },
data() { data() {
return { return {
@ -343,7 +347,7 @@ export default {
created() { created() {
this.getBusType(); this.getBusType();
let query = this.$route.query; let query = this.$route.query;
this.filterQuery.invStorageCode = this.data.formData.locStorageCode; this.filterQuery.invStorageCode = this.invQueryData.locStorageCode;
this.filterQuery = Object.assign(this.filterQuery, query); this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit); this.filterQuery.limit = parseInt(this.filterQuery.limit);
// //

@ -69,9 +69,6 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="billType"> <el-form-item prop="billType">
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.billType" placeholder="请选择业务类型" @change="actionChange"> <el-select v-model="formData.billType" placeholder="请选择业务类型" @change="actionChange">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
@ -90,7 +87,7 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item class="query-form-item" prop="corpName" <el-form-item class="query-form-item" prop="corpName"
v-if="curAction.corpType ==0 "> v-if="curAction.corpType ==0">
<el-select <el-select
v-model="formData.corpName" v-model="formData.corpName"
filterable filterable
@ -156,10 +153,7 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="locStorageCode"> <el-form-item prop="locStorageCode">
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">--> <el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange">
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -189,7 +183,7 @@
<!-- <el-radio-button :label="false" size="mini">禁用</el-radio-button>--> <!-- <el-radio-button :label="false" size="mini">禁用</el-radio-button>-->
<!-- </el-radio-group>--> <!-- </el-radio-group>-->
<el-form-item prop="type" style="margin-right: 20px;" <el-form-item prop="type" style="margin-right: 20px;"
v-if="curAction.mainAction=='WareHouseOut'"> v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
<el-checkbox v-model="formData.noInvOut"></el-checkbox> <el-checkbox v-model="formData.noInvOut"></el-checkbox>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -491,6 +485,7 @@
<dialogInvProduct <dialogInvProduct
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:data="thisData" :data="thisData"
:invQueryData="invQueryData"
></dialogInvProduct> ></dialogInvProduct>
</el-dialog> </el-dialog>
</div> </div>
@ -544,7 +539,7 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
}, },
formData: {noInvOut: false,}, formData: {noInvOut: false, locStorageCode: null},
formRules: { formRules: {
corpName: [ corpName: [
{required: true, message: "请输入供应商", trigger: "blur"} {required: true, message: "请输入供应商", trigger: "blur"}
@ -603,6 +598,7 @@ export default {
selectInvProductVisible: false, selectInvProductVisible: false,
thisData: {}, thisData: {},
storageList: [], storageList: [],
invQueryData: {},
}; };
}, },
components: { components: {
@ -618,7 +614,6 @@ export default {
this.currentRow = {}; this.currentRow = {};
this.selectedIndex = ""; this.selectedIndex = "";
this.iCount = 0; this.iCount = 0;
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
if (this.codeArray.length < 1) { if (this.codeArray.length < 1) {
@ -710,7 +705,6 @@ export default {
filterAll() filterAll()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
// this.formData.locStorageCode = this.storageList[0];
}) })
.catch(() => { .catch(() => {
}); });
@ -820,17 +814,24 @@ export default {
} }
this.thisData.stockOrderLists = this.codeArray; this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData; this.thisData.formData = this.formData;
let item = this.getActionItem(this.formData.billType); let item = this.getActionItem(this.formData.billType);
console.log(item.mainAction + "----" + this.formData.noInvOut); if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)// this.invQueryData = {
{ locStorageCode: this.formData.locStorageCode,
};
this.selectInvProductVisible = true;
} else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
this.invQueryData = {
locStorageCode: this.formData.corpId,
};
console.log("his.invQueryData " + this.invQueryData.locStorageCode);
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
} else { } else {
this.selectProductVisible = true; this.selectProductVisible = true;
} }
return; return;
} }
this.code = this.code.trim(); this.code = this.code.trim();
@ -872,35 +873,6 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
// let tQuery2 = {
// id: response.data.getId
// };
// if (this.orderEditor) {
// tQuery2.orderId = this.formData.id;
// console.log(tQuery2)
// addStockOrderDetailFromCodeById(tQuery2).then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.closeDialogC2(response);
// } else {
// this.$message.error(response.message);
// }
// }).catch(() => {
// this.loading = false;
// });
// } else {
// getStockOrderDetailInstrumentById(tQuery2).then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.closeDialogC2(response.data);
// } else {
// this.$message.error(response.message);
// }
// }).catch(() => {
// this.loading = false;
// });
// }
} else { } else {
this.thisData = response.data; this.thisData = response.data;
this.thisData.code = this.code; this.thisData.code = this.code;
@ -931,23 +903,9 @@ export default {
this.thisData = {}; this.thisData = {};
if (this.$isNotBlank(rData)) { if (this.$isNotBlank(rData)) {
console.log(rData)
// for (let i = 0; i < this.codeArray.length; i++) {
// let obj = this.codeArray[i];
// if (obj.batchNo == rData[0].batchNo) {
// obj.count = parseInt(obj.count) + parseInt(this.iCount);
// return;
// }
// }
this.codeArray = []; this.codeArray = [];
rData.forEach((obj, index) => { rData.forEach((obj, index) => {
// this.codeArray.push(obj);
this.codeArray.unshift(obj); this.codeArray.unshift(obj);
// if (this.codeArray.length === 0) {
// this.codeArray.push(obj);
// } else {
// this.codeArray.unshift(obj);
// }
}); });
console.log(this.codeArray); console.log(this.codeArray);
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
@ -956,37 +914,6 @@ export default {
this.focusNext('iCount'); this.focusNext('iCount');
this.closeConfirmFunction(true); this.closeConfirmFunction(true);
} }
// if (this.orderEditor) {
// this.getStockOrderDetailList();
// if (this.$isNotBlank(rData)) {
// this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
// this.currentRow = this.codeArray[0];
// this.selectedIndex = 0;
// this.focusNext('iCount');
// }
// } else {
// if (this.$isNotBlank(rData)) {
// // for (let i = 0; i < this.codeArray.length; i++) {
// // if (this.codeArray[i].productId === rData.productId) {
// // this.$alert("", '', {
// // confirmButtonText: '',
// // type: 'warning',
// // closeOnClickModal: true,
// // callback: action => {
// // this.$refs.inputRef.focus();
// // }
// // });
// // break;
// // }
// // if (i + 1 === this.codeArray.length) {
// // this.codeArray.push(rData);
// // this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
// // this.currentRow = this.codeArray[0];
// // this.selectedIndex = 0;
// // }
// // }
// }
// }
}, },
rowChange(val) { rowChange(val) {
this.currentRow = val; this.currentRow = val;
@ -1059,8 +986,6 @@ export default {
count: this.iCount, count: this.iCount,
code: this.code, code: this.code,
}; };
//012693548470801311200226172302271020022632100025
if (this.orderEditor) { if (this.orderEditor) {
addStockOrderDetailFromCode(tQuery).then((response) => { addStockOrderDetailFromCode(tQuery).then((response) => {
this.loading = false; this.loading = false;
@ -1317,10 +1242,13 @@ export default {
actionChange(item) { actionChange(item) {
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode; this.formData.locStorageCode = this.curAction.storageCode;
console.log(this.curAction.corpType + "---" + this.curAction.genUnit + "-----" + this.curAction.action); console.log(this.curAction.corpType + "---" + this.formData.locStorageCode + "-----" + this.curAction.action);
// this.formData.corpName = '';
// this.formData.corpId = '';
}, },
locInChange(item) {
console.log(item);
this.formData.locStorageCode = item;
this.$forceUpdate();
}
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -1345,12 +1273,9 @@ export default {
} else { } else {
this.formData = { this.formData = {
billdate: "", billdate: "",
// corpName: store.getters.companyName,
customerId: store.getters.customerId, customerId: store.getters.customerId,
// billType: "deliveryNote",
billType: "", billType: "",
type: "2", type: "2",
// type: "",
}; };
this.iCount = 0; this.iCount = 0;
this.orderEditor = false; this.orderEditor = false;

@ -390,6 +390,37 @@
<!-- :data="thisData"--> <!-- :data="thisData"-->
<!-- ></stockOrderNewSelectProduct>--> <!-- ></stockOrderNewSelectProduct>-->
<!-- </el-dialog>--> <!-- </el-dialog>-->
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
<el-dialog
title="库存产品录入"
:visible.sync="selectInvProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectInvProductVisible"
:append-to-body='true'
>
<dialogInvProduct
:closeDialog="closeDialogC2"
:data="thisData"
></dialogInvProduct>
</el-dialog>
</div> </div>
</template> </template>
@ -418,7 +449,7 @@ import store from "../../store";
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct"; import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain"; import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType} from "../../api/basic/busLocalType"; import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse"; import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
@ -497,6 +528,7 @@ export default {
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
selectInvProductVisible:false,
thisData: {}, thisData: {},
storageList: [], storageList: [],
}; };
@ -619,7 +651,9 @@ export default {
if (event == null) { if (event == null) {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
} else event.target.select(); } else {
event.target.select();
}
if (this.$isBlank(event)) { if (this.$isBlank(event)) {
this.code = ""; this.code = "";
this.$refs.multipleTable.setCurrentRow(); this.$refs.multipleTable.setCurrentRow();
@ -632,7 +666,18 @@ export default {
if (this.orderEditor) { if (this.orderEditor) {
this.thisData.orderId = this.formData.id this.thisData.orderId = this.formData.id
} }
this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData;
this.selectProductVisible = true; this.selectProductVisible = true;
let item = this.getActionItem(this.formData.billType);
console.log(item.mainAction + "----" + this.formData.noInvOut);
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)//
{
this.selectInvProductVisible = true;
} else {
this.selectProductVisible = true;
}
return; return;
} }
this.code = this.code.trim(); this.code = this.code.trim();
@ -1089,7 +1134,7 @@ export default {
let query = { let query = {
enabled: true, enabled: true,
}; };
getLocalBusType(query) getLocalJoinBusType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
}) })
@ -1112,6 +1157,13 @@ export default {
} }
} }
}, },
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].localAction === action) {
return this.busTypes[i];
}
}
},
findStorageMethod(query) { findStorageMethod(query) {
console.log(query); console.log(query);
this.fromStorageOptions = []; this.fromStorageOptions = [];

@ -502,9 +502,9 @@ export default {
data() { data() {
return { return {
query: { query: {
billType:null, billType: null,
corpName:null, corpName: null,
locStorageCode:null, locStorageCode: null,
billNo: "", billNo: "",
status: "2", status: "2",
startTime: "", startTime: "",

Loading…
Cancel
Save