1.修复无库存查询耗材字典无数据问题

2.修复复制单据往来单位无数据问题
zhairh
x_z 2 years ago
parent dd8e21b3a9
commit bdd6e2d034

@ -99,7 +99,7 @@
<el-form-item class="query-form-item" prop="fromCorp" <el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==0 "> v-if="curAction.corpType ==0 ">
<el-select <el-select
v-model="formData.fromCorp" v-model="formData.fromCorpId"
filterable filterable
remote remote
clearable="true" clearable="true"
@ -113,17 +113,17 @@
v-for="item in fromOptions" v-for="item in fromOptions"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item" :value="item.erpId"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" <el-form-item class="query-form-item" prop="fromCorpId"
v-if="curAction.corpType ==1"> v-if="curAction.corpType ==1">
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true" @change="getFormStorageCode" <el-select v-model="formData.fromCorpId" placeholder="请选择分库" clearable="true" @change="getFormStorageCode"
> >
<el-option <el-option
v-for="item in fromSubStorageOptions" v-for="item in fromSubStorageOptions"
@ -197,6 +197,7 @@ import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {stockOrderChange, stockOrderDetail} from "@/api/inout/stockOrder"; import {stockOrderChange, stockOrderDetail} from "@/api/inout/stockOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse"; import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {convertDate} from "@/utils/date" import {convertDate} from "@/utils/date"
import {isBlank} from "@/utils/strUtil";
export default { export default {
name: "DialogcChangeNewOrder", name: "DialogcChangeNewOrder",
@ -254,7 +255,7 @@ export default {
this.$message.error("当前分库不能为空"); this.$message.error("当前分库不能为空");
return; return;
} }
if (this.curAction.corpType === 1 && this.$isBlank(this.formData.fromSubInvCode)) { if (this.curAction.corpType === 1 && this.$isBlank(this.formData.fromCorpId)) {
this.$message.error('往来单位分库不能为空'); this.$message.error('往来单位分库不能为空');
return; return;
} }
@ -263,7 +264,7 @@ export default {
return; return;
} }
if (this.formData.locStorageCode === this.formData.fromCorp || this.formData.invWarehouseCode === this.formData.fromSubInvCode) { if (this.formData.locStorageCode === this.formData.fromCorpId || this.formData.invWarehouseCode === this.formData.fromSubInvCode) {
this.$message.error("当前仓库和往来仓库不能相同!"); this.$message.error("当前仓库和往来仓库不能相同!");
return; return;
} }
@ -305,8 +306,12 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getFormStorageCode(){ getFormStorageCode(subInvId){
// this.formData.locStorageCode= this.subInvList.find(item => item.code == this.formData.invWarehouseCode).parentId this.fromSubStorageOptions.forEach(item => {
if (subInvId === item.code) {
this.formData.fromCorp = item.name;
}
});
}, },
locCHange() { locCHange() {
@ -408,9 +413,12 @@ export default {
} }
}, },
unitChange(row) { unitChange(erpId) {
this.formData.fromCorpId = row.erpId; this.fromOptions.forEach(item => {
this.formData.fromCorp = row.name; if (erpId === item.erpId) {
this.formData.fromCorp = item.name;
}
})
}, },
actionChange(item) { actionChange(item) {
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);

@ -715,7 +715,6 @@ export default {
}); });
}, },
selectProductFunction(event) { selectProductFunction(event) {
if (event == null) { if (event == null) {
} else { } else {
event.target.select(); event.target.select();
@ -750,7 +749,6 @@ export default {
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
invWarehouseCode: this.formData.invWarehouseCode, invWarehouseCode: this.formData.invWarehouseCode,
}; };
debugger
if (!isBlank(this.formData.unitIdFk) && this.formData.unitIdFk === this.formData.corpId) { if (!isBlank(this.formData.unitIdFk) && this.formData.unitIdFk === this.formData.corpId) {
this.invQueryData.corpId = this.formData.corpId; this.invQueryData.corpId = this.formData.corpId;
} }
@ -764,6 +762,7 @@ export default {
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
} else { } else {
this.invQueryData.corpId = this.formData.corpId; this.invQueryData.corpId = this.formData.corpId;
this.thisData.noInvOut = this.formData.noInvOut;
this.selectProductVisible = true; this.selectProductVisible = true;
} }
return; return;

@ -314,6 +314,10 @@ export default {
this.listQuery.companyName = this.data.formData.corpName; this.listQuery.companyName = this.data.formData.corpName;
} }
if (this.data !== undefined && this.data.noInvOut !== undefined && this.data.noInvOut == true) {
this.listQuery.companyName = null;
}
if (this.filterType != null && this.filterType === 2) { if (this.filterType != null && this.filterType === 2) {
filterAllProduct(this.listQuery) filterAllProduct(this.listQuery)
.then((response) => { .then((response) => {
@ -428,6 +432,7 @@ export default {
components: {udiRlDetailDialog}, components: {udiRlDetailDialog},
created() { created() {
console.log(this.data)
if (this.$isNotBlank(this.data)) { if (this.$isNotBlank(this.data)) {
// this.listQuery.nameCode = this.data.udi; // this.listQuery.nameCode = this.data.udi;
// if (this.data.billType != null) { // if (this.data.billType != null) {

Loading…
Cancel
Save