|
|
|
@ -171,24 +171,37 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前分库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="invWarehouseCode">
|
|
|
|
|
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in subInvList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px;">
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span></span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<!-- <el-form-item prop="type">-->
|
|
|
|
|
<!-- <el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">-->
|
|
|
|
|
<!-- <el-option label="预入库" value="1"></el-option>-->
|
|
|
|
|
<!-- <el-option label="普通采购" value="2"></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item prop="type">-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-radio-group v-model="formData.noInvOut" style="margin-right: 20px;margin-left: 20px">-->
|
|
|
|
|
<!-- <el-radio-button :label="true" size="mini">允许</el-radio-button>-->
|
|
|
|
|
<!-- <el-radio-button :label="false" size="mini">禁用</el-radio-button>-->
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
<el-form-item prop="type" style="margin-right: 20px;"
|
|
|
|
|
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
|
|
|
|
|
<el-checkbox v-model="formData.noInvOut">允许无库存出库</el-checkbox>
|
|
|
|
@ -196,53 +209,9 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px;">
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<!-- <el-row :gutter="20" style="margin-top: -10px;">-->
|
|
|
|
|
<!-- <el-col :span="3">-->
|
|
|
|
|
<!-- <div class="ao-text">-->
|
|
|
|
|
<!-- <span>采购类别:</span>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="7">-->
|
|
|
|
|
<!-- <el-form-item prop="type">-->
|
|
|
|
|
<!-- <el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">-->
|
|
|
|
|
<!-- <el-option label="预入库" value="1"></el-option>-->
|
|
|
|
|
<!-- <el-option label="普通采购" value="2"></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
|
<!-- <el-row :gutter="20" style="padding-bottom: 10px; margin-top: -10px">-->
|
|
|
|
|
<!-- <el-col :span="20">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- @click.native.stop="addCode()"-->
|
|
|
|
|
<!-- style="display: flex; height: 31px; margin-left: auto; margin-right: 0;"-->
|
|
|
|
|
<!-- :loading="loading"-->
|
|
|
|
|
<!-- >产品录入-->
|
|
|
|
|
<!-- </el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-button-group style="display: flex">-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- @click.native.stop="addCode()"-->
|
|
|
|
|
<!-- style="margin: 0px 60px 10px auto; height: 35px"-->
|
|
|
|
|
<!-- :loading="loading"-->
|
|
|
|
|
<!-- >产品录入-->
|
|
|
|
|
<!-- </el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-button-group>-->
|
|
|
|
|
<el-button-group style="display: flex">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
@ -255,47 +224,6 @@
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
|
|
|
|
|
<!-- <el-row :gutter="20">-->
|
|
|
|
|
<!-- <el-col :span="3">-->
|
|
|
|
|
<!-- <div class="ao-text">-->
|
|
|
|
|
<!-- <span>扫码录入:</span>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="10">-->
|
|
|
|
|
<!-- <el-form-item prop="code">-->
|
|
|
|
|
|
|
|
|
|
<!-- <!– @keyup.native.enter="focusNext('iCount')" @focus="getInputFocus($event)"-->
|
|
|
|
|
<!-- @keypress.enter.native="selectProductFunction($event)"-->
|
|
|
|
|
<!-- –>-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
|
|
|
|
|
<!-- @keyup.enter.native="selectProductFunction($event)"-->
|
|
|
|
|
<!-- v-model="code"-->
|
|
|
|
|
<!-- auto-complete="off"-->
|
|
|
|
|
<!-- ref='inputRef'-->
|
|
|
|
|
<!-- @focus="getInputFocus($event)"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <!– <el-col :span="3">–>-->
|
|
|
|
|
<!-- <!– <div class="ao-text">–>-->
|
|
|
|
|
<!-- <!– <span>数量:</span>–>-->
|
|
|
|
|
<!-- <!– </div>–>-->
|
|
|
|
|
<!-- <!– </el-col>–>-->
|
|
|
|
|
<!-- <!– <el-col :span="4">–>-->
|
|
|
|
|
<!-- <!– <el-form-item prop="iCount">–>-->
|
|
|
|
|
<!-- <!– <!– @keypress.enter.native="addCode()"–>–>-->
|
|
|
|
|
<!-- <!– <el-input v-model="iCount" auto-complete="off" ref="iCount"–>-->
|
|
|
|
|
<!-- <!– @keypress.enter.native="iCountEnterFunction()"–>-->
|
|
|
|
|
<!-- <!– @focus="getInputFocus($event)"–>-->
|
|
|
|
|
<!-- <!– @input="iCountChange"–>-->
|
|
|
|
|
<!-- <!– oninput="value=value.replace(/[^\d]/g,'')"></el-input>–>-->
|
|
|
|
|
<!-- <!– </el-form-item>–>-->
|
|
|
|
|
<!-- <!– </el-col>–>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
|
|
|
|
|
<!-- highlight-current-row-->
|
|
|
|
|
<!-- @current-change="rowChange"-->
|
|
|
|
|
<el-table v-loading="loading" :data="codeArray" style="width: 100%;"
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
max-height="300" height="300" ref="multipleTable">
|
|
|
|
@ -324,46 +252,22 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="180" label="生产日期(yyMMdd)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- <el-input size="small" v-model="scope.row.productDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请输入生产日期" style="width: 80%"></el-input>-->
|
|
|
|
|
|
|
|
|
|
<el-input v-model="scope.row.productDate" auto-complete="off"
|
|
|
|
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
|
|
|
|
:disabled="scope.row.index !== selectedIndex"
|
|
|
|
|
type="number"
|
|
|
|
|
></el-input>
|
|
|
|
|
<!-- <el-date-picker-->
|
|
|
|
|
<!-- type="date"-->
|
|
|
|
|
<!-- size="small" v-model="scope.row.productDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请选择生产日期" style="width: 80%"-->
|
|
|
|
|
<!-- value-format="yyMMdd"-->
|
|
|
|
|
<!-- format="yyyy-MM-dd"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-date-picker>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="180" label="失效日期(yyMMdd)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- <el-input size="small" v-model="scope.row.expireDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请输入失效日期" style="width: 80%"></el-input>-->
|
|
|
|
|
|
|
|
|
|
<el-input v-model="scope.row.expireDate" auto-complete="off"
|
|
|
|
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
|
|
|
|
:disabled="scope.row.index !== selectedIndex"
|
|
|
|
|
type="number"
|
|
|
|
|
></el-input>
|
|
|
|
|
<!-- <el-date-picker-->
|
|
|
|
|
<!-- type="date"-->
|
|
|
|
|
<!-- size="small" v-model="scope.row.expireDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请选择失效日期" style="width: 80%"-->
|
|
|
|
|
<!-- value-format="yyMMdd"-->
|
|
|
|
|
<!-- format="yyyy-MM-dd"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-date-picker>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="150" label="单据数量">
|
|
|
|
@ -376,16 +280,6 @@
|
|
|
|
|
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column width="150" label="实际数量">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <el-input size="small" v-model="scope.row.reCount"-->
|
|
|
|
|
<!-- placeholder="请输入数量" style="width: 80%"-->
|
|
|
|
|
<!-- type='number'-->
|
|
|
|
|
<!-- @change="tableCountChange(scope.row)"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- oninput="value=value.replace(/[^\d]/g,'')"></el-input>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column width="150" label="价格">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input size="small" v-model="scope.row.price"
|
|
|
|
@ -396,11 +290,6 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<!--<el-table-column width="150"-->
|
|
|
|
|
<!--label="单据数量"-->
|
|
|
|
|
<!--prop="count"-->
|
|
|
|
|
<!--show-overflow-tooltip-->
|
|
|
|
|
<!--></el-table-column>-->
|
|
|
|
|
<el-table-column width="150"
|
|
|
|
|
label="注册/备案凭证号"
|
|
|
|
|
prop="zczbhhzbapzbh"
|
|
|
|
@ -424,16 +313,6 @@
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- v-if="orderEditor && scope.row.index === selectedIndex"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- @click.stop="true"-->
|
|
|
|
|
<!-- @click.native="saveCodeArray(scope.$index, scope.row)"-->
|
|
|
|
|
<!-- >保存-->
|
|
|
|
|
<!-- </el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -521,6 +400,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
|
|
|
|
|
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
|
|
|
|
|
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
|
|
|
|
|
import dialogInvProduct from "../inventory/DialogInvProduct"
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "idQuery",
|
|
|
|
@ -546,7 +426,7 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
},
|
|
|
|
|
formData: {noInvOut: false, locStorageCode: null},
|
|
|
|
|
formData: {noInvOut: false, locStorageCode: null, invWarehouseCode: null},
|
|
|
|
|
formRules: {
|
|
|
|
|
corpName: [
|
|
|
|
|
{required: true, message: "请输入供应商", trigger: "blur"}
|
|
|
|
@ -603,6 +483,7 @@ export default {
|
|
|
|
|
thisData: {},
|
|
|
|
|
storageList: [],
|
|
|
|
|
invQueryData: {},
|
|
|
|
|
subInvList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -632,20 +513,27 @@ export default {
|
|
|
|
|
if (!this.$isBlank(this.codeArray[i].expireDate) && this.codeArray[i].expireDate.length != 6) {
|
|
|
|
|
return this.$message.error('失效日期格式错误');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status === '3') {
|
|
|
|
|
for (let i = 0; i < this.codeArray.length; i++) {
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
|
}
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].batchNo)) {
|
|
|
|
|
if (!this.codeArray[i].allowNoBatch) {
|
|
|
|
|
return this.$message.error('批次号不能为空');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (this.$isBlank(this.codeArray[i].batchNo)) {
|
|
|
|
|
// if (!this.codeArray[i].allowNoBatch) {
|
|
|
|
|
// return this.$message.error('批次号不能为空');
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
|
return this.$message.error('生产日期与失效日期不能全部为空');
|
|
|
|
|
}
|
|
|
|
|
// if (this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
|
// return this.$message.error('失效日期不能为空');
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (status === '2') {
|
|
|
|
@ -653,6 +541,14 @@ export default {
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (!this.$isBlank(this.codeArray[i].productDate && this.codeArray[i].productDate.length != 6)) {
|
|
|
|
|
// return this.$message.error('生产日期格式错误');
|
|
|
|
|
// }
|
|
|
|
|
// if (!this.$isBlank(this.codeArray[i].expireDate && this.codeArray[i].expireDate.length != 6)) {
|
|
|
|
|
// return this.$message.error('失效日期不能为空');
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -696,6 +592,7 @@ export default {
|
|
|
|
|
filterAllByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
this.invChange();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
@ -1278,8 +1175,24 @@ export default {
|
|
|
|
|
this.formData.locStorageCode = item;
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
this.getBusType(item);
|
|
|
|
|
this.invChange();
|
|
|
|
|
this.findStorageMethod();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
invChange() {
|
|
|
|
|
|
|
|
|
|
if (this.$isNotBlank(this.formData.invWarehouseCode))
|
|
|
|
|
this.formData.invWarehouseCode = null;
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.formData.locStorageCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
filters: {},
|
|
|
|
|
mounted() {
|
|
|
|
@ -1291,7 +1204,7 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
this.getBusType("NOCODE");
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.formData = {};
|
|
|
|
|
this.formData = {noInvOut: false, locStorageCode: null, invWarehouseCode: null};
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
|
if (this.$isNotBlank(this.idQuery.id)) {
|
|
|
|
|