业务单据功能界面修改

master
anthonywj 3 years ago
parent 5f5f1d7293
commit 1b07355857

@ -5,8 +5,8 @@ window.global_config = {
"BASE_URL": "http://139.159.187.130:8080", "BASE_URL": "http://139.159.187.130:8080",
/** /**
"BASE_URL":"http://139.159.187.130/SPMS_SERVER", "BASE_URL":"http://192.168.192.201/SPMS_SERVER",
"SERVER_IP": "http://139.159.187.130/" "SERVER_IP": "http://192.168.192.201/SPMS_SERVER"
"BASE_URL":"http://192.168.0.109:9996", "BASE_URL":"http://192.168.0.109:9996",

@ -1,6 +1,6 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.ce169290.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.16263ee5.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.ce169290.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto'); <!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.cc490a0d.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.76b56a5d.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.cc490a0d.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
window.addEventListener('hashchange', function () { window.addEventListener('hashchange', function () {
ga('set', 'page', window.location.href); ga('set', 'page', window.location.href);
ga('send', 'pageview'); ga('send', 'pageview');
});</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.16263ee5.js></script></body></html> });</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.76b56a5d.js></script></body></html>

@ -5,8 +5,8 @@ window.global_config = {
"BASE_URL": "http://139.159.187.130:8080", "BASE_URL": "http://139.159.187.130:8080",
/** /**
"BASE_URL":"http://139.159.187.130/SPMS_SERVER", "BASE_URL":"http://192.168.192.201/SPMS_SERVER",
"SERVER_IP": "http://139.159.187.130/" "SERVER_IP": "http://192.168.192.201/SPMS_SERVER"
"BASE_URL":"http://192.168.0.109:9996", "BASE_URL":"http://192.168.0.109:9996",

@ -60,7 +60,7 @@
<span>{{ enableMap[scope.row.secCheckEnable] }}</span> <span>{{ enableMap[scope.row.secCheckEnable] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="校验业务单据" prop="localName" fixed></el-table-column> <el-table-column label="关联业务单据" prop="localName" fixed></el-table-column>
<!-- <el-table-column label="第三方系统" prop="thirdName" fixed></el-table-column>--> <!-- <el-table-column label="第三方系统" prop="thirdName" fixed></el-table-column>-->

@ -123,7 +123,7 @@
</template> </template>
<script> <script>
import {getLocalBusType, addLocalBusType, updateLocalBusType,deleteLocalBusType} from "@/api/basic/busLocalType"; import {getLocalBusType, addLocalBusType, updateLocalBusType, deleteLocalBusType} from "@/api/basic/busLocalType";
import modifyDialog from "./BussinessTypeLoclModify"; import modifyDialog from "./BussinessTypeLoclModify";
export default { export default {

@ -78,7 +78,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.advanceType"></el-checkbox> <el-checkbox v-model="inputQuery.advanceType"></el-checkbox>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="el-col"> <el-col :span="4" class="el-col">
@ -259,7 +259,10 @@ export default {
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.changeList = response.data || []; this.changeList = response.data || [];
this.visibleChange = true; if(this.inputQuery.changeEnable){
this.visibleChange = true;
}
} else { } else {
// this.$message.error(response.message); // this.$message.error(response.message);
this.visibleChange = false; this.visibleChange = false;

@ -65,7 +65,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 v-model="inputQuery.localAction" placeholder="请选择" clearable> <el-select v-model="inputQuery.localAction" placeholder="请选择" clearable>
<el-option <el-option
@ -103,9 +103,9 @@
<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 v-model="inputQuery.storageCode" placeholder="默认仓库信息"> <el-select v-model="inputQuery.storageCode" placeholder="当前仓库信息">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -209,13 +209,13 @@
</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.checkPdaEd" :disabled="!inputQuery.checkEnable"> <el-checkbox v-model="inputQuery.checkPdaUn" :disabled="!inputQuery.checkEnable">
</el-checkbox> </el-checkbox>
</div> </div>
</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.checkPdaUn" :disabled="!inputQuery.checkEnable"> <el-checkbox v-model="inputQuery.checkPdaEd" :disabled="!inputQuery.checkEnable">
</el-checkbox> </el-checkbox>
</div> </div>
</el-col> </el-col>
@ -365,7 +365,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(() => {
}); });

@ -0,0 +1,356 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-refresh"-->
<!-- @click="onReset"-->
<!-- ></el-button>-->
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row="false"
ref="multipleTable">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc">
</el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount">
<template slot-scope="scope">
{{ (scope.row.inCount - scope.row.outCount) }}
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="intentDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>
<el-dialog
title="库存详情"
:visible.sync="codeDetailVisible"
width="85%"
v-if="codeDetailVisible"
>
<codeDetail
:idQuery="idQuery"
v-on:closeDetailDialog="closeDetailDialog"
></codeDetail>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {
filterProducts,
filterDetailProducts,
deleteProducts,
} from "../../api/inventory/InvProducts";
import draggable from "vuedraggable";
import codeDetail from "./InvProductsDetail";
import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getStockOrderDetailInstrumentById} from "@/api/warehouse/stockOrder";
export default {
name: "DialogInvProduct",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
filterQuery: {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
page: 1,
limit: 20,
customerId: null,
supId: null,
unitFk: null,
invStorageCode: null,
},
detailQuery: {
code: null,
productIdFk: null,
page: 1,
limit: 20,
},
list: [],
codeDetailVisible: false,
total: 0,
loading: true,
index: null,
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
deleteLoading: false,
busTypes: [],
idQuery: null,
showSup: false,
fromOptions: [],
};
},
components: {
draggable,
codeDetail,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
customerId: null,
unitFk: null,
supId: null,
page: 1,
limit: 20,
};
this.getList();
},
onSubmit() {
this.loading = true;
this.getList();
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleUnitClick(row) {
this.curIndex = row.id;
this.dialogTableVisible = true;
},
closeDetailDialog(val) {
this.codeDetailVisible = false;
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery)
.then((response) => {
console.log(response)
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteOrders(data) {
this.loading = true;
let query = {
id: data,
}
deleteProducts(query)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
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;
});
},
intentDetail(row) {
this.idQuery = row;
// this.idQuery.supId = null;
this.idQuery.customerId = null;
this.codeDetailVisible = true;
},
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
combine() {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
}
let ids = [];
selection.forEach((obj, index) => {
let data = {
relId: obj.relIdFk,
batchNo: obj.batchNo,
productDate: obj.productionDate,
expireDate: obj.expireDate,
}
ids.push(data);
});
this.loading = true;
let tQuery = {
datas: ids,
stockOrderLists: this.data.stockOrderLists,
};
getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "danger",
};
return statusMap[status];
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
let query = this.$route.query;
this.filterQuery.invStorageCode = this.data.formData.locStorageCode;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -427,9 +427,9 @@ export default {
// error: "", // error: "",
// null: "", // null: "",
// success: "", // success: "",
1: "校验异常", 1: "等待校验",
0: "校验", 0: "等待校验",
2: "校验成功", 2: "等待校验",
}, },
// //
unitquery: {key: "", page: 1, limit: 20}, unitquery: {key: "", page: 1, limit: 20},

@ -318,6 +318,8 @@ export default {
orderId: this.idQuery.id, orderId: this.idQuery.id,
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
action: this.formData.action, action: this.formData.action,
fromCorp: this.formData.fromCorp,
fromCorpId: this.formData.fromCorpId,
} }
submitOrderWeb(tQuery) submitOrderWeb(tQuery)
.then((response) => { .then((response) => {

@ -78,16 +78,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <!-- <el-col :span="3">-->
<div class="ao-text"> <!-- <div class="ao-text">-->
<span>采购类型</span> <!-- <span>采购类型</span>-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :span="7"> <!-- <el-col :span="7">-->
<el-form-item prop="type"> <!-- <el-form-item prop="type">-->
<el-input v-model="typeMap[formData.type]" auto-complete="off" :disabled="true"></el-input> <!-- <el-input v-model="typeMap[formData.type]" auto-complete="off" :disabled="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">

@ -50,11 +50,11 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型" width="100"> <!-- <el-table-column label="采购类型" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.type | typeFilterName }} <!-- {{ scope.row.type | typeFilterName }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="250"> <el-table-column label="操作" fixed="right" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

@ -29,7 +29,6 @@
</el-button-group> </el-button-group>
</el-row> </el-row>
<el-card style="margin-top: -5px;"> <el-card style="margin-top: -5px;">
<el-row :gutter="20" style="margin-top: 10px;"> <el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="3"> <el-col :span="3">
@ -65,14 +64,35 @@
<el-row :gutter="20" style="margin-top: -10px"> <el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>往来信息</span> <span>业务类型</span>
</div>
</el-col>
<el-col :span="7">
<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-option
v-for="item in busTypes"
: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-col :span="3">
<div class="ao-text">
<span>往来单位</span>
</div> </div>
</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.fromCorp" v-model="formData.corpName"
filterable filterable
remote remote
clearable="true" clearable="true"
@ -95,7 +115,7 @@
<el-form-item class="query-form-item" prop="fromCorp" <el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1"> v-if="curAction.corpType ==1">
<el-select <el-select
v-model="formData.fromCorp" v-model="formData.corpName"
filterable filterable
remote remote
clearable="true" clearable="true"
@ -109,7 +129,7 @@
v-for="item in fromStorageOptions" v-for="item in fromStorageOptions"
:key="item.value" :key="item.value"
:label="item.code" :label="item.code"
:value="item.name"> :value="item">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ <span style="float: right; color: #8492a6; font-size: 13px">{{
item.code item.code
@ -118,33 +138,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.corpType ==2"> <el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.corpType ==2">
<el-input v-model="formData.fromCorp" auto-complete="off" <el-input v-model="formData.corpName" auto-complete="off"
clearable clearable
placeholder="请输入病人住院号" placeholder="请输入病人住院号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3">
<div class="ao-text">
<span>业务类型</span>
</div>
</el-col>
<el-col :span="7">
<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-option
v-for="item in busTypes"
: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>
<el-row :gutter="20" style="margin-top: -10px"> <el-row :gutter="20" style="margin-top: -10px">
@ -170,6 +170,33 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<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=='WareHouseOut'">
<el-checkbox v-model="formData.noInvOut"></el-checkbox>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px;">
</el-row> </el-row>
<!-- <el-row :gutter="20" style="margin-top: -10px;">--> <!-- <el-row :gutter="20" style="margin-top: -10px;">-->
@ -294,36 +321,48 @@
placeholder="请输入批次号" style="width: 80%"></el-input> placeholder="请输入批次号" style="width: 80%"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="生产日期"> <el-table-column width="180" label="生产日期(yyMMdd)">
<template slot-scope="scope"> <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"--> <!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请输入生产日期" style="width: 80%"></el-input>--> <!-- placeholder="请输入生产日期" style="width: 80%"></el-input>-->
<el-date-picker
type="date" <el-input v-model="scope.row.productDate" auto-complete="off"
size="small" v-model="scope.row.productDate" oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
placeholder="请选择生产日期" style="width: 80%" type="number"
value-format="yyMMdd" ></el-input>
format="yyyy-MM-dd" <!-- <el-date-picker-->
> <!-- type="date"-->
</el-date-picker> <!-- 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> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="失效日期"> <el-table-column width="180" label="失效日期(yyMMdd)">
<template slot-scope="scope"> <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"--> <!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请输入失效日期" style="width: 80%"></el-input>--> <!-- placeholder="请输入失效日期" style="width: 80%"></el-input>-->
<el-date-picker
type="date" <el-input v-model="scope.row.expireDate" auto-complete="off"
size="small" v-model="scope.row.expireDate" oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
placeholder="请选择失效日期" style="width: 80%" type="number"
value-format="yyMMdd" ></el-input>
format="yyyy-MM-dd" <!-- <el-date-picker-->
> <!-- type="date"-->
</el-date-picker> <!-- 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> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="单据数量"> <el-table-column width="150" label="单据数量">
@ -336,16 +375,16 @@
oninput="value=value.replace(/[^\d]/g,'')"></el-input> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="实际数量"> <!-- <el-table-column width="150" label="实际数量">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-input size="small" v-model="scope.row.reCount" <!-- <el-input size="small" v-model="scope.row.reCount"-->
placeholder="请输入数量" style="width: 80%" <!-- placeholder="请输入数量" style="width: 80%"-->
type='number' <!-- type='number'-->
@change="tableCountChange(scope.row)" <!-- @change="tableCountChange(scope.row)"-->
:disabled="scope.row.index !== selectedIndex" <!-- :disabled="scope.row.index !== selectedIndex"-->
oninput="value=value.replace(/[^\d]/g,'')"></el-input> <!-- oninput="value=value.replace(/[^\d]/g,'')"></el-input>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column width="150" label="价格"> <el-table-column width="150" label="价格">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.price" <el-input size="small" v-model="scope.row.price"
@ -439,6 +478,21 @@
:data="thisData" :data="thisData"
></stockOrderNewSelectProduct> ></stockOrderNewSelectProduct>
</el-dialog> </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>
@ -446,17 +500,12 @@
import { import {
stockOrderDetail, stockOrderDetail,
submitStockOrder, submitStockOrder,
submitStockOrderError,
uploadStockOrderDetailCount,
stockOrderGenerateBillNo, stockOrderGenerateBillNo,
getStockOrderDetailInstrument, getStockOrderDetailInstrument,
deleteStockOrderById,
insertStockOrderWeb, insertStockOrderWeb,
stockOrderDetailTemp,
deleteStockOrderDetailById, deleteStockOrderDetailById,
addStockOrderDetailFromCode, addStockOrderDetailFromCode,
uploadStockOrderDetail, uploadStockOrderDetail,
copyStockOrderDetail,
stockOrderDetailQueryProduct, stockOrderDetailQueryProduct,
getStockOrderDetailInstrumentById, stockOrderDetail2 getStockOrderDetailInstrumentById, stockOrderDetail2
} from "../../api/warehouse/stockOrder"; } from "../../api/warehouse/stockOrder";
@ -469,6 +518,7 @@ import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/bas
import {getBussinessType} from "../../api/basic/bussinessType"; 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"; import {filterAll} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct"
export default { export default {
name: "idQuery", name: "idQuery",
@ -494,7 +544,7 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
}, },
formData: {}, formData: {noInvOut: false,},
formRules: { formRules: {
corpName: [ corpName: [
{required: true, message: "请输入供应商", trigger: "blur"} {required: true, message: "请输入供应商", trigger: "blur"}
@ -550,6 +600,7 @@ export default {
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
selectInvProductVisible: false,
thisData: {}, thisData: {},
storageList: [], storageList: [],
}; };
@ -557,6 +608,7 @@ export default {
components: { components: {
draggable, draggable,
stockOrderNewSelectProduct, stockOrderNewSelectProduct,
dialogInvProduct,
}, },
methods: { methods: {
saveOrder(status) { saveOrder(status) {
@ -574,17 +626,47 @@ export default {
return; return;
} }
for (let i = 0; i < this.codeArray.length; i++) {
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('失效日期格式错误');
}
}
if (status === '3') { if (status === '3') {
for (let i = 0; i < this.codeArray.length; i++) { 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.$isBlank(this.codeArray[i].batchNo)) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
if (this.$isBlank(this.codeArray[i].productDate)) { if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期不能为空'); return this.$message.error('生产日期与失效日期不能全部为空');
} }
if (this.$isBlank(this.codeArray[i].expireDate)) { // if (this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('失效日期不能为空'); // return this.$message.error('');
// }
}
}
if (status === '2') {
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].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('');
// }
} }
} }
@ -620,13 +702,10 @@ export default {
}, },
storageChange(row) { storageChange(row) {
console.log(row); console.log(row);
this.formData.fromCorpId = row.code; this.formData.corpId = row.code;
this.formData.fromCorp = row.name; this.formData.corpName = row.name;
}, },
getStorage(event) { getStorage(event) {
// let query = {
// advanceType: this.getActionName(event),
// };
this.storageList = []; this.storageList = [];
filterAll() filterAll()
.then((response) => { .then((response) => {
@ -719,8 +798,15 @@ 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)) {
if (this.$isBlank(this.formData.corpName) || this.$isBlank(this.formData.billType)) {
this.$message.error("往来信息和单据类型不能为空!")
return;
}
this.code = ""; this.code = "";
this.$refs.multipleTable.setCurrentRow(); this.$refs.multipleTable.setCurrentRow();
this.currentRow = {}; this.currentRow = {};
@ -733,7 +819,18 @@ export default {
this.thisData.orderId = this.formData.id this.thisData.orderId = this.formData.id
} }
this.thisData.stockOrderLists = this.codeArray; this.thisData.stockOrderLists = this.codeArray;
this.selectProductVisible = true; this.thisData.formData = this.formData;
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();
@ -830,6 +927,7 @@ export default {
}, },
closeDialogC2(rData) { closeDialogC2(rData) {
this.selectProductVisible = false; this.selectProductVisible = false;
this.selectInvProductVisible = false;
this.thisData = {}; this.thisData = {};
if (this.$isNotBlank(rData)) { if (this.$isNotBlank(rData)) {
@ -1019,12 +1117,12 @@ export default {
if (this.$isBlank(row.batchNo)) { if (this.$isBlank(row.batchNo)) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
if (this.$isBlank(row.productDate)) { // if (this.$isBlank(row.productDate)) {
return this.$message.error('生产日期不能为空'); // return this.$message.error('');
} // }
if (this.$isBlank(row.expireDate)) { // if (this.$isBlank(row.expireDate)) {
return this.$message.error('失效日期不能为空'); // return this.$message.error('');
} // }
this.$refs.multipleTable.setCurrentRow(); this.$refs.multipleTable.setCurrentRow();
this.currentRow = {}; this.currentRow = {};
@ -1182,7 +1280,6 @@ export default {
getLocalJoinBusType(query) getLocalJoinBusType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
// this.getStorage(this.formData.billType);
}) })
.catch(() => { .catch(() => {
}); });
@ -1220,7 +1317,9 @@ 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.curAction.genUnit + "-----" + this.curAction.action);
// this.formData.corpName = '';
// this.formData.corpId = '';
}, },
}, },
filters: {}, filters: {},

@ -85,11 +85,17 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型">
<el-table-column label="当前仓库" prop="locStorageCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | typeFilterName }} <span>{{ getStorageName(scope.row.locStorageCode) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="采购类型">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.type | typeFilterName }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -335,6 +341,7 @@ import addOrder from "./addOrder";
import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf"; import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf";
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType} from "../../api/basic/busLocalType"; import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "stockOrder", name: "stockOrder",
@ -353,6 +360,7 @@ export default {
page: 1, page: 1,
limit: 20 limit: 20
}, },
storageList: [],
busTypes: [], busTypes: [],
list: [], list: [],
detailList: [], detailList: [],
@ -717,6 +725,22 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
}
}
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
@ -775,6 +799,7 @@ export default {
}, },
created() { created() {
// //
this.getStorage();
this.getBusType(); this.getBusType();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();

@ -71,11 +71,16 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型"> <el-table-column label="当前仓库" prop="locStorageCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | typeFilterName }} <span>{{ getStorageName(scope.row.locStorageCode) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="采购类型">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.type | typeFilterName }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <!-- <el-button-->
@ -310,6 +315,7 @@ import draggable from "vuedraggable";
import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf"; import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf";
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType} from "../../api/basic/busLocalType"; import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "stockOrderDelSearch", name: "stockOrderDelSearch",
@ -333,6 +339,7 @@ export default {
detailList: [], detailList: [],
total: 0, total: 0,
detailTotal: 0, detailTotal: 0,
storageList: [],
loading: false, loading: false,
detailLoading: false, detailLoading: false,
idQuery: { idQuery: {
@ -679,6 +686,22 @@ export default {
} }
}); });
}, },
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
}
}
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
supplementOrder(row) { supplementOrder(row) {
this.$confirm('是否确认补单?', '提示', { this.$confirm('是否确认补单?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -736,6 +759,7 @@ export default {
} }
}, },
created() { created() {
this.getStorage();
this.getBusType(); this.getBusType();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();

@ -65,7 +65,7 @@
<el-row :gutter="20" style="margin-top: -10px"> <el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>供应商</span> <span>往来单位</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -98,10 +98,8 @@
</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 v-model="formData.billType" placeholder="请选择业务类型" disabled>
<!--</el-select>-->
<el-select v-model="formData.billType" placeholder="请选择业务类型">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
@ -115,16 +113,38 @@
</el-row> </el-row>
<el-row :gutter="20" style="margin-top: -10px;"> <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-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>采购类型</span> <span>当前仓库</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="type"> <el-form-item prop="locStorageCode">
<el-select v-model="formData.type" style="width: 100%" placeholder="采购类型"> <!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<el-option label="预入库" value="1"></el-option> <!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<el-option label="普通采购" value="2"></el-option> <!--</el-select>-->
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" disabled>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -132,31 +152,6 @@
</el-card> </el-card>
<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-group style="display: flex">
<el-button <el-button
type="primary" type="primary"
@ -258,28 +253,38 @@
</el-table-column> </el-table-column>
<el-table-column width="180" label="生产日期"> <el-table-column width="180" label="生产日期">
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker <!-- <el-date-picker-->
type="date" <!-- type="date"-->
size="small" v-model="scope.row.productDate" <!-- size="small" v-model="scope.row.productDate"-->
:disabled="scope.row.index !== selectedIndex" <!-- :disabled="scope.row.index !== selectedIndex"-->
placeholder="请选择生产日期" style="width: 80%" <!-- placeholder="请选择生产日期" style="width: 80%"-->
value-format="yyMMdd" <!-- value-format="yyMMdd"-->
format="yyyy-MM-dd" <!-- format="yyyy-MM-dd"-->
> <!-- >-->
</el-date-picker> <!-- </el-date-picker>-->
<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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="失效日期"> <el-table-column width="180" label="失效日期">
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker <!-- <el-date-picker-->
type="date" <!-- type="date"-->
size="small" v-model="scope.row.expireDate" <!-- size="small" v-model="scope.row.expireDate"-->
:disabled="scope.row.index !== selectedIndex" <!-- :disabled="scope.row.index !== selectedIndex"-->
placeholder="请选择失效日期" style="width: 80%" <!-- placeholder="请选择失效日期" style="width: 80%"-->
value-format="yyMMdd" <!-- value-format="yyMMdd"-->
format="yyyy-MM-dd" <!-- format="yyyy-MM-dd"-->
> <!-- >-->
</el-date-picker> <!-- </el-date-picker>-->
<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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="实际数量"> <el-table-column width="150" label="实际数量">
@ -414,6 +419,7 @@ 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} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
@ -426,6 +432,10 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
detailCountMax: {
type: Object,
required: true,
}
// closeConfirmFunction: { // closeConfirmFunction: {
// type: Function, // type: Function,
// required: true, // required: true,
@ -455,6 +465,7 @@ export default {
], ],
}, },
codeArray: [], codeArray: [],
fromStorageOptions: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -487,6 +498,7 @@ export default {
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
thisData: {}, thisData: {},
storageList: [],
}; };
}, },
components: { components: {
@ -495,7 +507,6 @@ export default {
}, },
methods: { methods: {
saveOrder(status) { saveOrder(status) {
this.code = ""; this.code = "";
this.$refs.multipleTable.setCurrentRow(); this.$refs.multipleTable.setCurrentRow();
this.currentRow = {}; this.currentRow = {};
@ -504,11 +515,20 @@ export default {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
if (this.codeArray.length < 1) { if (this.codeArray.length < 1) {
this.$message.warning('未添加产品'); this.$message.warning('未添加产品');
return; return;
} }
for (let i = 0; i < this.codeArray.length; i++) {
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('失效日期格式错误');
}
}
if (status === '2') { if (status === '2') {
this.submitFunction(status); this.submitFunction(status);
} else { } else {
@ -516,15 +536,18 @@ export default {
if (this.$isBlank(this.codeArray[i].batchNo)) { if (this.$isBlank(this.codeArray[i].batchNo)) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
if (this.$isBlank(this.codeArray[i].productDate)) { if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期不能为空'); return this.$message.error('生产日期与失效日期不能全部为空');
}
if (this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('失效日期不能为空');
} }
if (this.$isBlank(this.codeArray[i].reCount) || this.codeArray[i].reCount === '0') { if (this.$isBlank(this.codeArray[i].reCount) || this.codeArray[i].reCount === '0') {
return this.$message.error('配货数量不能小于0'); return this.$message.error('配货数量不能小于0');
} }
if (this.detailCountMax) {
if (this.codeArray[i].count < this.codeArray[i].reCount) {
this.$message.error("实际数量不能高于订单数量");
return;
}
}
} }
this.$confirm("是否确定提交订单?", "提示", { this.$confirm("是否确定提交订单?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -1073,6 +1096,35 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
getStorage(event) {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.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(() => {
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -1083,6 +1135,7 @@ export default {
}, },
created() { created() {
this.getBusType(); this.getBusType();
this.getStorage();
this.formData = {}; this.formData = {};
this.codeArray = []; this.codeArray = [];
// this.closeConfirmFunction(false); // this.closeConfirmFunction(false);

@ -47,7 +47,7 @@
</el-table-column> </el-table-column>
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip></el-table-column> <el-table-column label="单据号" prop="billNo" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商名称" prop="corpName" show-overflow-tooltip></el-table-column> <el-table-column label="往来单位" prop="corpName" show-overflow-tooltip></el-table-column>
<el-table-column label="单据来源" prop="sourceType" width="150"> <el-table-column label="单据来源" prop="sourceType" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ sourceMap[scope.row.sourceType] }}</span> <span>{{ sourceMap[scope.row.sourceType] }}</span>
@ -64,11 +64,16 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型"> <el-table-column label="当前仓库" prop="locStorageCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | typeFilterName }} <span>{{ getStorageName(scope.row.locStorageCode) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="采购类型">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.type | typeFilterName }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="250"> <el-table-column label="操作" fixed="right" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -98,7 +103,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
:page-size="query.limit" :page-size="query.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@ -158,21 +162,6 @@
> >
</el-pagination> </el-pagination>
</el-card> </el-card>
<!--<el-dialog-->
<!--title="配货"-->
<!--:visible.sync="distributionVisible"-->
<!--width="60%"-->
<!--v-if="distributionVisible"-->
<!--@close='closeDialog'-->
<!--&gt;-->
<!--<stockOrderDistribution-->
<!--:closeDialog="closeDialog"-->
<!--:idQuery="idQuery"-->
<!--&gt;</stockOrderDistribution>-->
<!--</el-dialog>-->
<el-dialog <el-dialog
title="单据配货管理" title="单据配货管理"
:visible.sync="distributionVisible" :visible.sync="distributionVisible"
@ -186,6 +175,7 @@
<stockOrderEditDistribution <stockOrderEditDistribution
:closeDialog="closeDialog" :closeDialog="closeDialog"
:idQuery="idQuery" :idQuery="idQuery"
:detailCountMax="detailCountMax"
></stockOrderEditDistribution> ></stockOrderEditDistribution>
</el-dialog> </el-dialog>
@ -256,7 +246,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>供应商</span> <span>往来单位</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -357,14 +347,18 @@
<el-form-item prop="productDate"> <el-form-item prop="productDate">
<!-- <el-input v-model="detailFormData.productDate" auto-complete="off"--> <!-- <el-input v-model="detailFormData.productDate" auto-complete="off"-->
<!-- :disabled="false"></el-input>--> <!-- :disabled="false"></el-input>-->
<el-date-picker <!-- <el-date-picker-->
type="date" <!-- type="date"-->
size="small" v-model="detailFormData.productDate" <!-- size="small" v-model="detailFormData.productDate"-->
placeholder="请选择生产日期" style="width: 80%" <!-- placeholder="请选择生产日期" style="width: 80%"-->
value-format="yyMMdd" <!-- value-format="yyMMdd"-->
format="yyyy-MM-dd" <!-- format="yyyy-MM-dd"-->
> <!-- >-->
</el-date-picker> <!-- </el-date-picker>-->
<el-input v-model="detailFormData.productDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
type="number"
:disabled="false"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -376,14 +370,20 @@
<el-form-item prop="expireDate"> <el-form-item prop="expireDate">
<!-- <el-input v-model="detailFormData.expireDate" auto-complete="off"--> <!-- <el-input v-model="detailFormData.expireDate" auto-complete="off"-->
<!-- :disabled="false"></el-input>--> <!-- :disabled="false"></el-input>-->
<el-date-picker <el-input v-model="detailFormData.expireDate" auto-complete="off"
type="date" oninput="if(value.length>6)value=value.slice(0,6)"
size="small" v-model="detailFormData.expireDate" type="number"
placeholder="请选择失效日期" style="width: 80%" :disabled="false"></el-input>
value-format="yyMMdd"
format="yyyy-MM-dd"
> <!-- <el-date-picker-->
</el-date-picker> <!-- type="date"-->
<!-- size="small" v-model="detailFormData.expireDate"-->
<!-- placeholder="请选择失效日期" style="width: 80%"-->
<!-- value-format="yyMMdd"-->
<!-- format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -468,6 +468,9 @@ import addOrder from "./addOrder";
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType} from "../../api/basic/busLocalType"; import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf"; import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "stockOrderEditor", name: "stockOrderEditor",
data() { data() {
@ -486,6 +489,7 @@ export default {
limit: 20 limit: 20
}, },
list: [], list: [],
storageList: [],
busTypes: [], busTypes: [],
detailList: [], detailList: [],
total: 0, total: 0,
@ -493,7 +497,7 @@ export default {
loading: false, loading: false,
detailLoading: false, detailLoading: false,
formData: {}, formData: {},
detailCountMax: false,
sourceMap: { sourceMap: {
"1": "网页新增", "1": "网页新增",
"2": "第三方系统", "2": "第三方系统",
@ -534,6 +538,7 @@ export default {
filterUDIType: false, filterUDIType: false,
selectThrOrderVisible: false, selectThrOrderVisible: false,
thisData: {}, thisData: {},
storageList: [],
actDateRange: [], actDateRange: [],
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
@ -829,6 +834,14 @@ export default {
if (valid) { if (valid) {
this.detailLoading = true; this.detailLoading = true;
let tQuery = this.detailFormData; let tQuery = this.detailFormData;
console.log(this.detailCountMax + "---" + this.detailFormData.count + "---" + this.detailFormData.reCount)
if (this.detailCountMax) {
if (this.detailFormData.count < this.detailFormData.reCount) {
this.$message.error("实际数量不能高于订单数量");
return;
}
}
uploadStockOrderDetail(tQuery).then((response) => { uploadStockOrderDetail(tQuery).then((response) => {
this.detailLoading = false; this.detailLoading = false;
if (response.code === 20000) { if (response.code === 20000) {
@ -848,7 +861,36 @@ export default {
}); });
} }
}); });
} },
getSysParm() {
let query = {
paramKey: "stock_order_detail_count_max",
};
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.detailCountMax = true;
} else
this.detailCountMax = false;
}
});
},
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
}
}
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
}, },
components: { components: {
draggable, draggable,
@ -882,6 +924,8 @@ export default {
} }
}, },
created() { created() {
this.getStorage();
this.getSysParm();
this.getBusType(); this.getBusType();
this.getList(); this.getList();
let end = new Date(); let end = new Date();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -264,12 +264,17 @@ export default {
} }
let ids = []; let ids = [];
selection.forEach((obj, index) => { selection.forEach((obj, index) => {
ids.push(obj.rlId); let data = {
relId: obj.relIdFk,
batchNo: obj.batchNo,
productDate: obj.productionDate,
expireDate: obj.expireDate,
}
ids.push(data);
}); });
this.loading = true; this.loading = true;
let tQuery = { let tQuery = {
ids: ids, datas: ids,
stockOrderLists: this.data.stockOrderLists, stockOrderLists: this.data.stockOrderLists,
}; };
getStockOrderDetailInstrumentById(tQuery).then((response) => { getStockOrderDetailInstrumentById(tQuery).then((response) => {
@ -321,6 +326,8 @@ export default {
if (this.$isNotBlank(this.data)) { if (this.$isNotBlank(this.data)) {
console.log(this.data.stockOrderLists); console.log(this.data.stockOrderLists);
this.listQuery.nameCode = this.data.udi; this.listQuery.nameCode = this.data.udi;
this.listQuery.billType = this.data.formData.billType;
this.listQuery.corpId = this.data.formData.corpId;
this.orderEditor = this.data.orderEditor; this.orderEditor = this.data.orderEditor;
this.orderId = this.data.orderId; this.orderId = this.data.orderId;
this.getList(); this.getList();

@ -71,11 +71,16 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型" show-overflow-tooltip> <el-table-column label="当前仓库" prop="locStorageCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | typeFilterName }} <span>{{ getStorageName(scope.row.locStorageCode) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="采购类型" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.type | typeFilterName }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <!-- <el-button-->
@ -325,6 +330,7 @@ import draggable from "vuedraggable";
import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf"; import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf";
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType} from "../../api/basic/busLocalType"; import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "stockOrderSearch", name: "stockOrderSearch",
@ -346,6 +352,7 @@ export default {
busTypes: [], busTypes: [],
list: [], list: [],
detailList: [], detailList: [],
storageList: [],
total: 0, total: 0,
detailTotal: 0, detailTotal: 0,
loading: false, loading: false,
@ -674,6 +681,22 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
}
}
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
@ -733,6 +756,7 @@ export default {
} }
}, },
created() { created() {
this.getStorage();
this.getBusType(); this.getBusType();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();

@ -63,11 +63,17 @@
<span>{{ getActionName(scope.row.billType) }}</span> <span>{{ getActionName(scope.row.billType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购类型">
<el-table-column label="当前仓库" prop="locStorageCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | typeFilterName }} <span>{{ getStorageName(scope.row.locStorageCode) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="采购类型">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.type | typeFilterName }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -308,6 +314,7 @@ import addOrder from "./addOrder";
import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf"; import {inspectionStockOrderPDFFromTemplateFile, stockOrderPDFFromTemplateFile} from "../../api/itextpdf/itextpdf";
import store from "../../store"; import store from "../../store";
import {getLocalJoinBusType} from "../../api/basic/busLocalType"; import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "stockOrderWaitCheck", name: "stockOrderWaitCheck",
@ -330,6 +337,7 @@ export default {
list: [], list: [],
detailList: [], detailList: [],
total: 0, total: 0,
storageList: [],
detailTotal: 0, detailTotal: 0,
loading: false, loading: false,
detailLoading: false, detailLoading: false,
@ -704,6 +712,22 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
}
}
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
submitUploadDetail() { submitUploadDetail() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
@ -762,6 +786,7 @@ export default {
}, },
created() { created() {
// //
this.getStorage();
this.getBusType(); this.getBusType();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();

Loading…
Cancel
Save