|
|
|
@ -69,8 +69,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="corpName"
|
|
|
|
|
v-if="curAction.corpType ==0 && curAction.genUnit ==false">
|
|
|
|
|
<el-form-item class="query-form-item" prop="corpName"
|
|
|
|
|
v-if="curAction.corpType ==0 ">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.fromCorp"
|
|
|
|
|
filterable
|
|
|
|
@ -80,7 +80,7 @@
|
|
|
|
|
placeholder="请输入往来单位"
|
|
|
|
|
:remote-method="findMethod"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
@change="unitChange"
|
|
|
|
|
@change="selectOne"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromOptions"
|
|
|
|
@ -91,32 +91,9 @@
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-select-->
|
|
|
|
|
<!-- style="width: 100%"-->
|
|
|
|
|
<!-- v-model="sValue"-->
|
|
|
|
|
<!-- :multiple="false"-->
|
|
|
|
|
<!-- filterable-->
|
|
|
|
|
<!-- remote-->
|
|
|
|
|
<!-- reserve-keyword-->
|
|
|
|
|
<!-- placeholder="请输入供应商名称"-->
|
|
|
|
|
<!-- :remote-method="remoteMethod"-->
|
|
|
|
|
<!-- :loading="sLoading"-->
|
|
|
|
|
<!-- @change="selectOne">-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="item in sOptions"-->
|
|
|
|
|
<!-- :key="idx"-->
|
|
|
|
|
<!-- :label="item.name"-->
|
|
|
|
|
<!-- :value="item">-->
|
|
|
|
|
<!-- </el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp"
|
|
|
|
|
v-if="curAction.corpType ==1 && curAction.genUnit ==false">
|
|
|
|
|
v-if="curAction.corpType ==1">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.fromCorp"
|
|
|
|
|
filterable
|
|
|
|
@ -126,7 +103,7 @@
|
|
|
|
|
placeholder="请输入仓库信息"
|
|
|
|
|
:remote-method="findStorageMethod"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
@change="unitChange"
|
|
|
|
|
@change="storageChange"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromStorageOptions"
|
|
|
|
@ -140,7 +117,7 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.genUnit ==true">
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.corpType ==2">
|
|
|
|
|
<el-input v-model="formData.fromCorp" auto-complete="off"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入病人住院号"
|
|
|
|
@ -157,20 +134,19 @@
|
|
|
|
|
<!--<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
|
|
|
|
|
v-for="item in busTypes"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.action">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
:key="item.localAction"
|
|
|
|
|
:label="item.localName"
|
|
|
|
|
:value="item.localAction">
|
|
|
|
|
<span style="float: left">{{ item.localName }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px">
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
@ -196,21 +172,21 @@
|
|
|
|
|
</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-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-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
@ -273,21 +249,21 @@
|
|
|
|
|
></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-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-->
|
|
|
|
@ -301,7 +277,7 @@
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
|
|
|
<el-table-column width="150"
|
|
|
|
|
label="产品名称"
|
|
|
|
|
label="产品通用名"
|
|
|
|
|
prop="productName"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
@ -318,40 +294,75 @@
|
|
|
|
|
placeholder="请输入批次号" style="width: 80%"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="150" label="生产日期">
|
|
|
|
|
<el-table-column width="180" label="生产日期">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input size="small" v-model="scope.row.productDate"
|
|
|
|
|
<!-- <el-input size="small" v-model="scope.row.productDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请输入生产日期" style="width: 80%"></el-input>-->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
type="date"
|
|
|
|
|
size="small" v-model="scope.row.productDate"
|
|
|
|
|
:disabled="scope.row.index !== selectedIndex"
|
|
|
|
|
placeholder="请输入生产日期" style="width: 80%"></el-input>
|
|
|
|
|
placeholder="请选择生产日期" style="width: 80%"
|
|
|
|
|
value-format="yyMMdd"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="150" label="失效日期">
|
|
|
|
|
<el-table-column width="180" label="失效日期">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input size="small" v-model="scope.row.expireDate"
|
|
|
|
|
<!-- <el-input size="small" v-model="scope.row.expireDate"-->
|
|
|
|
|
<!-- :disabled="scope.row.index !== selectedIndex"-->
|
|
|
|
|
<!-- placeholder="请输入失效日期" style="width: 80%"></el-input>-->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
type="date"
|
|
|
|
|
size="small" v-model="scope.row.expireDate"
|
|
|
|
|
:disabled="scope.row.index !== selectedIndex"
|
|
|
|
|
placeholder="请输入失效日期" style="width: 80%"></el-input>
|
|
|
|
|
placeholder="请选择失效日期" style="width: 80%"
|
|
|
|
|
value-format="yyMMdd"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="150" label="产品数量">
|
|
|
|
|
<el-table-column width="150" label="单据数量">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input size="small" v-model="scope.row.count"
|
|
|
|
|
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="产品价格">
|
|
|
|
|
<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"
|
|
|
|
|
type='number'
|
|
|
|
|
:disabled="scope.row.index !== selectedIndex"
|
|
|
|
|
placeholder="请输入价格" style="width: 80%"
|
|
|
|
|
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
|
|
|
|
|
></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<!--<el-table-column width="150"-->
|
|
|
|
|
<!--label="单据数量"-->
|
|
|
|
|
<!--prop="count"-->
|
|
|
|
|
<!--show-overflow-tooltip-->
|
|
|
|
|
<!--></el-table-column>-->
|
|
|
|
|
<el-table-column width="150"
|
|
|
|
|
label="批准文号"
|
|
|
|
|
label="注册/备案凭证号"
|
|
|
|
|
prop="zczbhhzbapzbh"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
@ -447,7 +458,7 @@ import {
|
|
|
|
|
uploadStockOrderDetail,
|
|
|
|
|
copyStockOrderDetail,
|
|
|
|
|
stockOrderDetailQueryProduct,
|
|
|
|
|
addStockOrderDetailFromCodeById, getStockOrderDetailInstrumentById, stockOrderDetail2
|
|
|
|
|
getStockOrderDetailInstrumentById, stockOrderDetail2
|
|
|
|
|
} from "../../api/inout/stockOrder";
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {saveAs} from "file-saver";
|
|
|
|
@ -456,7 +467,7 @@ import store from "../../store";
|
|
|
|
|
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
|
|
|
|
|
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
|
|
|
|
|
import {getBussinessType} from "../../api/basic/bussinessType";
|
|
|
|
|
import {getLocalBusType,getLocalJoinBusType} from "../../api/basic/busLocalType";
|
|
|
|
|
import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType";
|
|
|
|
|
import {filterAll} from "@/api/basic/invWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -483,8 +494,6 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
},
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
fromStorageOptions: [],
|
|
|
|
|
formData: {},
|
|
|
|
|
formRules: {
|
|
|
|
|
corpName: [
|
|
|
|
@ -496,11 +505,16 @@ export default {
|
|
|
|
|
billType: [
|
|
|
|
|
{required: true, message: "请选择业务类型", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
type: [
|
|
|
|
|
{required: true, message: "请选择采购类型", trigger: "blur"}
|
|
|
|
|
locStorageCode: [
|
|
|
|
|
{required: true, message: "请选择当前仓库", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
// type: [
|
|
|
|
|
// {required: true, message: "请选择采购类型", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
},
|
|
|
|
|
codeArray: [],
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
fromStorageOptions: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
loading: false,
|
|
|
|
|
index: null,
|
|
|
|
@ -508,7 +522,6 @@ export default {
|
|
|
|
|
formVisible: false,
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
orderNo: null,
|
|
|
|
|
|
|
|
|
|
statusMap: {
|
|
|
|
|
101: "未处理",
|
|
|
|
|
102: "已处理",
|
|
|
|
@ -523,6 +536,10 @@ export default {
|
|
|
|
|
1: "预入库",
|
|
|
|
|
2: "普通采购",
|
|
|
|
|
},
|
|
|
|
|
curAction: {
|
|
|
|
|
corpType: 0,
|
|
|
|
|
genUnit: false,
|
|
|
|
|
},
|
|
|
|
|
orderEditor: true,
|
|
|
|
|
iCount: 0,
|
|
|
|
|
sOptions: [],
|
|
|
|
@ -534,10 +551,7 @@ export default {
|
|
|
|
|
selectedIndex: "",
|
|
|
|
|
selectProductVisible: false,
|
|
|
|
|
thisData: {},
|
|
|
|
|
curAction: {
|
|
|
|
|
corpType: 0,
|
|
|
|
|
genUnit: false,
|
|
|
|
|
},
|
|
|
|
|
storageList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -559,6 +573,8 @@ export default {
|
|
|
|
|
this.$message.warning('未添加产品');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status === '3') {
|
|
|
|
|
for (let i = 0; i < this.codeArray.length; i++) {
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].batchNo)) {
|
|
|
|
|
return this.$message.error('批次号不能为空');
|
|
|
|
@ -570,6 +586,9 @@ export default {
|
|
|
|
|
return this.$message.error('失效日期不能为空');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status === '501') {
|
|
|
|
|
this.submitFunction(status);
|
|
|
|
|
} else {
|
|
|
|
@ -577,7 +596,13 @@ export default {
|
|
|
|
|
if (status == "1") {
|
|
|
|
|
this.submitFunction(status);
|
|
|
|
|
} else {
|
|
|
|
|
this.$confirm("是否提交订单?", "提示", {
|
|
|
|
|
let tip = "是否确定提交订单?";
|
|
|
|
|
if (status == "2") {
|
|
|
|
|
tip = "是否确定提交单据为未配货?";
|
|
|
|
|
} else if (status == "3") {
|
|
|
|
|
tip = "是否确定提交单据为已配货?";
|
|
|
|
|
}
|
|
|
|
|
this.$confirm(tip, "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
@ -593,6 +618,45 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
storageChange(row) {
|
|
|
|
|
console.log(row);
|
|
|
|
|
this.formData.fromCorpId = row.code;
|
|
|
|
|
this.formData.fromCorp = row.name;
|
|
|
|
|
},
|
|
|
|
|
getStorage(event) {
|
|
|
|
|
// let query = {
|
|
|
|
|
// advanceType: this.getActionName(event),
|
|
|
|
|
// };
|
|
|
|
|
this.storageList = [];
|
|
|
|
|
filterAll()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
// this.formData.locStorageCode = this.storageList[0];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getActionName(action) {
|
|
|
|
|
for (let i = 0; i < this.busTypes.length; i++) {
|
|
|
|
|
if (this.busTypes[i].action === action) {
|
|
|
|
|
return this.busTypes[i].advanceType;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
this.fromStorageOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
|
key: query,
|
|
|
|
|
};
|
|
|
|
|
filterAll(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.fromStorageOptions = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
submitFunction(status) {
|
|
|
|
|
let tMessage = status === '501' ? '保存' : '提交';
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -668,6 +732,7 @@ export default {
|
|
|
|
|
if (this.orderEditor) {
|
|
|
|
|
this.thisData.orderId = this.formData.id
|
|
|
|
|
}
|
|
|
|
|
this.thisData.stockOrderLists = this.codeArray;
|
|
|
|
|
this.selectProductVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -747,6 +812,7 @@ export default {
|
|
|
|
|
if (this.orderEditor) {
|
|
|
|
|
this.thisData.orderId = this.formData.id
|
|
|
|
|
}
|
|
|
|
|
this.thisData.stockOrderLists = this.codeArray;
|
|
|
|
|
this.selectProductVisible = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -762,24 +828,34 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
closeDialogC2(rData) {//012693548470801311200226172302271020022632100025
|
|
|
|
|
closeDialogC2(rData) {
|
|
|
|
|
this.selectProductVisible = false;
|
|
|
|
|
this.thisData = {};
|
|
|
|
|
|
|
|
|
|
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 = [];
|
|
|
|
|
rData.forEach((obj, index) => {
|
|
|
|
|
if (this.codeArray.length === 0) {
|
|
|
|
|
this.codeArray.push(obj);
|
|
|
|
|
} else {
|
|
|
|
|
// this.codeArray.push(obj);
|
|
|
|
|
this.codeArray.unshift(obj);
|
|
|
|
|
}
|
|
|
|
|
// if (this.codeArray.length === 0) {
|
|
|
|
|
// this.codeArray.push(obj);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.codeArray.unshift(obj);
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
console.log(this.codeArray);
|
|
|
|
|
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
|
|
|
|
|
this.currentRow = this.codeArray[0];
|
|
|
|
|
this.selectedIndex = 0;
|
|
|
|
|
this.focusNext('iCount');
|
|
|
|
|
|
|
|
|
|
this.closeConfirmFunction(true);
|
|
|
|
|
}
|
|
|
|
|
// if (this.orderEditor) {
|
|
|
|
@ -859,43 +935,6 @@ export default {
|
|
|
|
|
focusNextToTable(nextRef) {
|
|
|
|
|
this.$refs[nextRef][0].focus()
|
|
|
|
|
},
|
|
|
|
|
remoteMethod(query) {
|
|
|
|
|
if (query !== '') {
|
|
|
|
|
this.sLoading = true;
|
|
|
|
|
let tQuery = {
|
|
|
|
|
key: query,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
};
|
|
|
|
|
getBasicUnitMaintains2(tQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.sLoading = false;
|
|
|
|
|
this.sOptions = response.data.list;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.sLoading = false;
|
|
|
|
|
this.sOptions = [];
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.sOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
this.fromOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
|
key: query,
|
|
|
|
|
};
|
|
|
|
|
getBasicUnitMaintains(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.fromOptions = response.data.page.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 刷新表单
|
|
|
|
|
resetForm() {
|
|
|
|
|
if (this.$refs["dataForm"]) {
|
|
|
|
@ -906,11 +945,6 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
unitChange(row) {
|
|
|
|
|
console.log(row);
|
|
|
|
|
this.formData.corpId = row.erpId;
|
|
|
|
|
this.formData.corpName = row.name;
|
|
|
|
|
},
|
|
|
|
|
addCode() {
|
|
|
|
|
this.code = this.code.trim();
|
|
|
|
|
if (this.$isBlank(this.code)) {
|
|
|
|
@ -1148,45 +1182,46 @@ export default {
|
|
|
|
|
getLocalJoinBusType(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.busTypes = response.data.list || [];
|
|
|
|
|
// this.getStorage(this.formData.billType);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
selectOne(event) {
|
|
|
|
|
|
|
|
|
|
this.formData.corpName = event.name;
|
|
|
|
|
this.formData.corpId = event.erpId;
|
|
|
|
|
this.formData.unitIdFk = event.erpId;
|
|
|
|
|
// console.log("this.inputQuery.companyId" + item);
|
|
|
|
|
console.log("this.inputQuery.companyId" + event.erpId);
|
|
|
|
|
},
|
|
|
|
|
findMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
this.fromStorageOptions = [];
|
|
|
|
|
this.fromOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
|
key: query,
|
|
|
|
|
};
|
|
|
|
|
filterAll(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.fromStorageOptions = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getStorage() {
|
|
|
|
|
this.storageList = [];
|
|
|
|
|
filterAll()
|
|
|
|
|
getBasicUnitMaintains(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
this.fromStorageOptions = response.data || [];
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.fromOptions = response.data.page.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getActionItem(action) {
|
|
|
|
|
for (let i = 0; i < this.busTypes.length; i++) {
|
|
|
|
|
if (this.busTypes[i].action === action) {
|
|
|
|
|
if (this.busTypes[i].localAction === action) {
|
|
|
|
|
return this.busTypes[i];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
actionChange(item) {
|
|
|
|
|
this.curAction = this.getActionItem(item);
|
|
|
|
|
console.log(this.curAction.corpType+"---"+this.curAction.genUnit+"-----"+ this.curAction.action)
|
|
|
|
|
this.formData.locStorageCode = this.curAction.storageCode;
|
|
|
|
|
console.log(this.curAction.corpType + "---" + this.curAction.genUnit + "-----" + this.curAction.action)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
filters: {},
|
|
|
|
|
mounted() {
|
|
|
|
@ -1197,7 +1232,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getStorage(this.formData.billType);
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.formData = {};
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
@ -1211,7 +1246,7 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.formData = {
|
|
|
|
|
billdate: "",
|
|
|
|
|
corpName: store.getters.companyName,
|
|
|
|
|
// corpName: store.getters.companyName,
|
|
|
|
|
customerId: store.getters.customerId,
|
|
|
|
|
// billType: "deliveryNote",
|
|
|
|
|
billType: "",
|
|
|
|
|