Merge remote-tracking branch 'origin/dev' into dev

dev
郑明梁 2 years ago
commit 6d0b59fe30

@ -5,9 +5,9 @@ VUE_APP_TITLE = UDI管理系统
ENV = 'development' ENV = 'development'
# 开发环境 # 开发环境
VUE_APP_BASE_API = 'http://127.0.0.1:9991' VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001" VUE_APP_SYNC_API ="http://192.168.0.166:10001"
# 应用访问路径 例如使用前缀 /admin/ # 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/' VUE_APP_CONTEXT_PATH = '/'

@ -31,7 +31,10 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/'
# 漳州中医院 # 漳州中医院
VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
# 片仔癀诊断
VUE_APP_BASE_API = 'http://192.168.0.100:9160/UDI_WMS_MC/'
# 应用访问路径 例如使用前缀 /admin/ # 应用访问路径 例如使用前缀 /admin/

@ -2,7 +2,7 @@
"name": "ruoyi-vue-plus", "name": "ruoyi-vue-plus",
"version": "4.3.0", "version": "4.3.0",
"description": "UDI自助平台", "description": "UDI自助平台",
"author": "LionLi", "author": "Glxp",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
@ -77,7 +77,7 @@
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0", "eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0", "eslint-plugin-vue": "7.2.0",
"html-webpack-plugin": "^5.5.1", "html-webpack-plugin": "4.5.2",
"lint-staged": "10.5.3", "lint-staged": "10.5.3",
"runjs": "4.4.2", "runjs": "4.4.2",
"sass": "1.32.13", "sass": "1.32.13",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -2,7 +2,7 @@ import axios from "@/utils/request";
export function filterDepts(query) { export function filterDepts(query) {
return axios({ return axios({
url: "/udi/auth/dept/filter", url: "/spms/inv/warehouse/filterAll",
method: "get", method: "get",
params: query params: query
}); });
@ -39,3 +39,8 @@ export function getDeptListByUser(params) {
params: params params: params
}); });
} }

@ -1,4 +1,5 @@
import axios from "@/utils/request"; import axios from "@/utils/request";
//获取数据 //获取数据
export function getBusTypeList(params) { export function getBusTypeList(params) {
return axios({ return axios({

@ -156,6 +156,14 @@ export function filterOrderList(query) {
}); });
} }
export function getUserBean(query) {
return axios({
url: "/udiwms/inout/order/getUserBean",
method: "get",
params: query
});
}
export function selectNew(query) { export function selectNew(query) {
return axios({ return axios({
url: "/admin/warehouse/inout/order/selectNew", url: "/admin/warehouse/inout/order/selectNew",

@ -69,3 +69,15 @@ export function getCodeSms() {
timeout: 20000 timeout: 20000
}) })
} }
export function getTitleConfig() {
return request({
url: '/spms/getTitleConfig',
headers: {
isToken: false
},
method: 'get',
timeout: 20000
})
}

@ -172,6 +172,14 @@ export function previewImage(data) {
}); });
} }
export function previewFile(url) {
return axios({
url: url,
method: "get",
responseType: 'arraybuffer'
});
}

@ -19,6 +19,16 @@ export function findInvByUser(query) {
}); });
} }
export function filterGroupBySpuse(params) {
return axios({
url: "/spms/inv/warehouse/filterGroupBySpuse",
method: "get",
params: params
});
}
//获取除了自己所有其他仓库 //获取除了自己所有其他仓库
export function findByFrom(query) { export function findByFrom(query) {
return axios({ return axios({
@ -76,6 +86,7 @@ export function deleteSubWarehouse(data) {
data: data data: data
}); });
} }
//查询第三方系统和仓库数据关联信息 //查询第三方系统和仓库数据关联信息
export function getSubThrsysDetail(params) { export function getSubThrsysDetail(params) {
return axios({ return axios({

@ -40,3 +40,12 @@ export function saveNewProduct(data) {
data: data data: data
}) })
} }
export function updateProduct(data) {
return axios({
url: '/udiwms/udiinfo/erp/products/update',
method: 'post',
data: data
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 19 KiB

@ -60,7 +60,7 @@ export default {
.sidebar-logo-container { .sidebar-logo-container {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100px; height: 110px;
line-height: 50px; line-height: 50px;
background: #2b2f3a; background: #2b2f3a;
text-align: center; text-align: center;
@ -72,7 +72,7 @@ export default {
& .sidebar-logo { & .sidebar-logo {
width: 100px; width: 100px;
height: 73px; height: 100px;
margin-top: 12px; margin-top: 12px;
vertical-align: middle; vertical-align: middle;
margin-right: 12px; margin-right: 12px;
@ -94,7 +94,7 @@ export default {
&.collapse { &.collapse {
.sidebar-logo { .sidebar-logo {
width: 44px; width: 44px;
height: 32px; height: 44px;
margin-right: 0px; margin-right: 0px;
} }
} }

@ -17,11 +17,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="送货单位:">-->
<!-- <el-input v-model="query.corpName" style="width: 90%" placeholder="请输入送货单位" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8"> <el-col :span="8">
<el-form-item class="query-form-item" label="单据类型:"> <el-form-item class="query-form-item" label="单据类型:">
@ -227,7 +222,7 @@ export default {
limit: 10, limit: 10,
startTime: "", startTime: "",
endTime: "", endTime: "",
inCodeStatus: 1, inCodeStatus: 0,
}, },
detailQuery: { detailQuery: {
orderIdFk: "", orderIdFk: "",
@ -344,7 +339,7 @@ export default {
limit: 10, limit: 10,
startTime: "", startTime: "",
endTime: "", endTime: "",
inCodeStatus: 1, inCodeStatus: 0,
}; };
this.getList(); this.getList();

@ -180,10 +180,10 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="是否在用:"> <el-form-item class="query-form-item" label="是否在用:">
<el-select <el-select
v-model="filterQuery.isDisable" v-model="filterQuery.isDisable"
placeholder="请选择是否在用" placeholder="请选择是否在用"
clearable clearable
style="width: 90%" style="width: 90%"
> >
<el-option label="在用" value="false"></el-option> <el-option label="在用" value="false"></el-option>
<el-option label="停用" value="true"></el-option> <el-option label="停用" value="true"></el-option>
@ -264,6 +264,36 @@
width="160" width="160"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
label="商品名称"
prop="spmc"
width="160"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:spmc')"
></el-table-column>
<el-table-column
label="商品条码"
prop="sptm"
width="160"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:sptm')"
></el-table-column>
<el-table-column
label="医保编码"
prop="ybbm"
width="160"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:ybbm')"
></el-table-column>
<el-table-column
label="计量单位"
prop="measname"
width="160"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:measname')"
></el-table-column>
<el-table-column <el-table-column
label="注册/备案号" label="注册/备案号"
prop="zczbhhzbapzbh" prop="zczbhhzbapzbh"
@ -277,10 +307,67 @@
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="是否在用" :label="productRemarkSet.remarkTitle1"
prop="isDisable" prop="basicPrductRemak1"
width="180" width="180"
show-overflow-tooltip show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak1')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle2"
prop="basicPrductRemak2"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak2')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle3"
prop="basicPrductRemak3"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak3')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle4"
prop="basicPrductRemak4"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak4')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle5"
prop="basicPrductRemak5"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak5')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle6"
prop="basicPrductRemak6"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak6')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle7"
prop="basicPrductRemak7"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak7')"
></el-table-column>
<el-table-column
:label="productRemarkSet.remarkTitle8"
prop="basicPrductRemak8"
width="180"
show-overflow-tooltip
v-if="$auth.hasPermi('basic:basicPrductRemak8')"
></el-table-column>
<el-table-column
label="是否在用"
prop="isDisable"
width="180"
show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.isDisable | isDisableFilterType"> <el-tag :type="scope.row.isDisable | isDisableFilterType">
@ -293,6 +380,7 @@
prop="groupBuy" prop="groupBuy"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
v-if="$auth.hasPermi('basic:groupBuy')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.groupBuy | statusFilterType"> <el-tag :type="scope.row.groupBuy | statusFilterType">
@ -305,6 +393,7 @@
prop="dispatch" prop="dispatch"
width="120" width="120"
show-overflow-tooltip show-overflow-tooltip
v-if="$auth.hasPermi('basic:dispatch')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.dispatch | statusFilterType"> <el-tag :type="scope.row.dispatch | statusFilterType">
@ -312,6 +401,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="操作" fixed="right"> <el-table-column width="180" label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -1555,7 +1645,16 @@ export default {
false: "不可配送", false: "不可配送",
}, },
pId: 0, pId: 0,
productRemarkSet: {}, productRemarkSet: {
remarkTitle1: "备注字段1",
remarkTitle2: "备注字段2",
remarkTitle3: "备注字段3",
remarkTitle4: "备注字段4",
remarkTitle5: "备注字段5",
remarkTitle6: "备注字段6",
remarkTitle7: "备注字段7",
remarkTitle8: "备注字段8",
},
relevanceEdit: { relevanceEdit: {
id: null, id: null,
thirdId: "", thirdId: "",
@ -2058,50 +2157,6 @@ export default {
} }
}); });
}, },
// selectSysParam() {
// let query = {
// paramKey: "smp_isUploadProuct",
// };
// spcombie().then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isSpCombine = true;
// } else {
// this.isSpCombine = false;
// }
// }
// });
//
// selectSysParamByKey(query).then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isUploadSmp = true;
// } else {
// this.isUploadSmp = false;
// }
// }
// });
// let query1 = {
// paramKey: "upload_pi_file_enabled",
// };
// selectSysParamByKey(query1).then((response) => {
// if (response.code == 20000) {
// if (response.data.paramValue == "1") {
// this.isImportFile = true;
// }
// }
// });
// let query2 = {
// paramKey: "upload_pi_file_url",
// };
// selectSysParamByKey(query2).then((response) => {
// if (response.code == 20000) {
// this.uploadFileUrl = response.data.paramValue;
// }
// });
// },
editUdiType() { editUdiType() {
this.selectUdiTypeVisible = true; this.selectUdiTypeVisible = true;
}, },

@ -69,47 +69,48 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="action" label="单据类型:"> <el-form-item prop="invCode" label="当前仓库:">
<el-select <el-select
v-model="orderFormData.action" v-model="orderFormData.invCode"
placeholder="请选择单据类型" placeholder="当前仓库"
:disabled="corpOrderIdDisabled"
style="width: 90%" style="width: 90%"
@change="actionChange" :disabled="corpOrderIdDisabled"
@change="changeInv"
filterable
> >
<el-option <el-option
v-for="item in busTypeOptions" v-for="item in curInvOptions"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.action" :value="item.code"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="invCode" label="当前仓库:"> <el-form-item prop="action" label="单据类型:">
<el-select <el-select
v-model="orderFormData.invCode" v-model="orderFormData.action"
placeholder="当前仓库" placeholder="请选择单据类型"
style="width: 90%"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
@change="changeInv" style="width: 90%"
filterable @change="actionChange"
> >
<el-option <el-option
v-for="item in curInvOptions" v-for="item in busTypeOptions"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code" :value="item.action"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -797,7 +798,11 @@ export default {
cQuery.corpType = 2; cQuery.corpType = 2;
} else if (this.curAction.corpType == 0) { } else if (this.curAction.corpType == 0) {
cQuery.corpType = 2; cQuery.corpType = 2;
} else return; } else if (this.curAction.corpType == 1) {
cQuery.corpType = 1;
cQuery.outType = 2;
} else
return;
getBasicUnitMaintains(cQuery) getBasicUnitMaintains(cQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
@ -817,7 +822,10 @@ export default {
if ((this.curAction.checkEnable && this.curAction.checkWebNew != 0) || this.viewType == 1) { if ((this.curAction.checkEnable && this.curAction.checkWebNew != 0) || this.viewType == 1) {
// 1 // 1
this.bizShow = true; this.bizShow = true;
} else this.bizShow = false; } else {
this.bizShow = false;
}
if ( if (
this.curAction.corpType == 0 || this.curAction.corpType == 0 ||
this.curAction.corpType == 2 || this.curAction.corpType == 2 ||
@ -1183,7 +1191,7 @@ export default {
}, },
submit(val) { submit(val) {
if(this.$isBlank(this.orderFormData.action)){ if (this.$isBlank(this.orderFormData.action)) {
this.$message.warning("单据类型不能为空!"); this.$message.warning("单据类型不能为空!");
return return
} }

@ -273,7 +273,7 @@ import AcceptOrder from "@/views/inout/DialogReviewOrder";
import DialogInvoice from "@/views/inout/DialogInvoice"; import DialogInvoice from "@/views/inout/DialogInvoice";
import InvoiceRegister from "@/views/inout/InvoiceRegister"; import InvoiceRegister from "@/views/inout/InvoiceRegister";
import {previewImage} from "@/api/purchase/supCompany"; import {previewImage,previewFile} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import store from "@/store"; import store from "@/store";
@ -613,8 +613,29 @@ export default {
); );
}, },
uploadHandlePreview(file) { uploadHandlePreview(file) {
console.log(file); // console.log(file.raw.type);
console.log(this.fileList); // console.log(this.fileList);
// let pdf = "application/pdf"
// let type = file.raw.type
// if(type==pdf){
//
// this.certFileUrl =
// this.BASE_URL +
// "/udiwms/image/register/file/getImage?type=image2&name=";
// this.imgList = [];
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// this.imgList = response.data;
// window.open(this.imgList[0])
// }
// console.log(this.imgList);
// });
// }else{
//
// }
}, },
uploadHandleRemove(file, fileList) { uploadHandleRemove(file, fileList) {
this.inputQuery.licenseUrl = null; this.inputQuery.licenseUrl = null;
@ -698,18 +719,34 @@ export default {
showImgViewer(row) { showImgViewer(row) {
this.certFileUrl = this.certFileUrl =
this.BASE_URL + this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="; "/udiwms/image/register/file/getImage?type=image2&name="+this.inputQuery.licenseUrl;
this.imgList = []; this.imgList = [];
previewImage({ this.imgList.push(this.certFileUrl)
imageUrl: this.inputQuery.licenseUrl, let index = this.inputQuery.licenseUrl.lastIndexOf('.');
certFileUrl: this.certFileUrl, if(index===-1){
}).then((response) => { this.$message.error("文件名异常!")
if (response.code === 20000) { return false
this.imgList = response.data; }
} if(this.inputQuery.licenseUrl.substr(index+1)==='pdf'){
console.log(this.imgList); let pdf = "application/pdf"
this.imgViewerVisible = true; let binaryData = [];
}); previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => { const m = (e) => {
e.preventDefault(); e.preventDefault();
}; };

@ -529,7 +529,7 @@
<script> <script>
import { import {
deleteByOrderId, deleteByOrderId,
getOrderList, rollUnReceivebackOrder, filterInvoice, filterOrder, filterOrderList getOrderList, rollUnReceivebackOrder, filterInvoice, filterOrder, filterOrderList, getUserBean
} from '../../api/inout/order' } from '../../api/inout/order'
import {getLocalJoinByUser} from "@/api/basic/busType"; import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
@ -552,7 +552,7 @@ import InvoiceRegistrationDetermine from "@/views/inout/InvoiceRegistrationDeter
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint" import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {getDeptListByUser} from "@/api/auth/authDept"; import {getDeptListByUser} from "@/api/auth/authDept";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {previewImage} from '@/api/purchase/supCompany' import {previewFile, previewImage} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -567,6 +567,7 @@ export default {
name: "IoCheckSuccessOrder", name: "IoCheckSuccessOrder",
data() { data() {
return { return {
users:{},
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
savebillno: null, savebillno: null,
invoiceRow: [], invoiceRow: [],
@ -795,29 +796,42 @@ export default {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
showImgViewer(row) { showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.licenseUrl;
this.imgList = []; this.imgList = [];
previewImage({imageUrl: row.licenseUrl, certFileUrl: this.certFileUrl}).then(response => { this.imgList.push(this.certFileUrl)
if (response.code === 20000) { let index = row.licenseUrl.lastIndexOf('.');
this.imgList = response.data; if(index===-1){
} this.$message.error("文件名异常!")
console.log(this.imgList) return false
this.imgViewerVisible = true; }
}); if(row.licenseUrl.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => { const m = (e) => {
e.preventDefault() e.preventDefault();
}; };
document.body.style.overflow = 'hidden'; document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
}, },
@ -915,6 +929,17 @@ export default {
this.getList(); this.getList();
}, },
getUser(){
getUserBean()
.then((res) => {
if(res.code == 20000){
if ( res.data.customerId == "110") {
this.showSup = true;
}
}
})
},
// //
getList() { getList() {
@ -996,6 +1021,7 @@ export default {
getInvListByUser() getInvListByUser()
.then((response) => { .then((response) => {
this.invList = response.data || []; this.invList = response.data || [];
}) })
.catch(() => { .catch(() => {
}); });
@ -1081,6 +1107,8 @@ export default {
this.bizQuery.batchNo = row.batchNo; this.bizQuery.batchNo = row.batchNo;
this.bizQuery.relId = row.bindRlFk; this.bizQuery.relId = row.bindRlFk;
// this.bizQuery.bizIdFk = row.id; // this.bizQuery.bizIdFk = row.id;
}else{
this.bizQuery = {}
} }
filterListInvoice(this.bizQuery).then((res) => { filterListInvoice(this.bizQuery).then((res) => {
this.invoiceLoading = false; this.invoiceLoading = false;
@ -1195,10 +1223,7 @@ export default {
, ,
created() { created() {
let supId = this.$store.getters.customerId; this.getUser();
if (supId == "110") {
this.showSup = true;
}
this.getInvList(); this.getInvList();
this.getDeptList(); this.getDeptList();
this.getBusType(); this.getBusType();

@ -515,7 +515,6 @@ export default {
this.getBusType(); this.getBusType();
this.getList(); this.getList();
this.lotType = this.$route.query.name; this.lotType = this.$route.query.name;
debugger
if (this.lotType == 'NO_LOT') { if (this.lotType == 'NO_LOT') {
this.viewType = 5; this.viewType = 5;
} else { } else {

@ -36,9 +36,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.batchNo" <el-input v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef' ref='inputBatchNoRef'
placeholder="请输入批次号"></el-input> placeholder="请输入批次号"></el-input>
<!--@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="120" label="生产日期"> <el-table-column width="120" label="生产日期">

@ -341,7 +341,6 @@ export default {
}, },
handleSortChange(column, prop, order) { handleSortChange(column, prop, order) {
debugger
if (column.order === 'descending') { if (column.order === 'descending') {
this.filterQuery.sort = 'desc' this.filterQuery.sort = 'desc'
} else { } else {

@ -93,22 +93,17 @@
<el-table-column width="150" label="养护数量" prop="count"></el-table-column> <el-table-column width="150" label="养护数量" prop="count"></el-table-column>
<el-table-column width="150" label="养护状态" prop="maintenanceStatus"> <el-table-column width="150" label="养护状态" prop="maintenanceStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio disabled="true" v-model="scope.row.maStatus" <el-tag :type="statusFilterType(scope.row.maStatus)">
:label="0">未养护 {{status[scope.row.maStatus]}}
</el-radio> </el-tag>
<el-radio disabled="true" v-model="scope.row.maStatus"
:label="1">已养护
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="设备状态" prop="deviceStatus"> <el-table-column width="150" label="设备状态" prop="deviceStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="scope.row.deviceStatus" :label="1" disabled="true"> <el-tag :type="statusFilterType(scope.row.deviceStatus)"
正常 >
</el-radio> {{deviceStatus[scope.row.deviceStatus]}}
<el-radio v-model="scope.row.deviceStatus" :label="0" disabled="true"> </el-tag>
异常
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" label="养护备注" prop="remark"> <el-table-column width="200" label="养护备注" prop="remark">
@ -162,6 +157,14 @@ export default {
1: "未审核", 1: "未审核",
2: "已审核" 2: "已审核"
}, },
status:{
0:"未养护",
1:"已养护",
},
deviceStatus:{
1:"正常",
0:"异常",
},
detailQuery: { detailQuery: {
orderIdFk: null, orderIdFk: null,
page: 1, page: 1,
@ -320,6 +323,15 @@ export default {
this.detailTotal = 0; this.detailTotal = 0;
}); });
}, },
statusFilterType(status) {
const statusMap = {
1: "success",
0: "danger",
};
return statusMap[status];
},
}, },
mounted() { mounted() {
document.body.ondrop = function (event) { document.body.ondrop = function (event) {

@ -76,22 +76,17 @@
<el-table-column width="150" label="养护数量" prop="count"></el-table-column> <el-table-column width="150" label="养护数量" prop="count"></el-table-column>
<el-table-column width="150" label="养护状态" prop="maintenanceStatus"> <el-table-column width="150" label="养护状态" prop="maintenanceStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio disabled="true" v-model="scope.row.maStatus" <el-tag :type="statusFilterType(scope.row.maStatus)">
:label="0">未养护 {{status[scope.row.maStatus]}}
</el-radio> </el-tag>
<el-radio disabled="true" v-model="scope.row.maStatus"
:label="1">已养护
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="设备状态" prop="deviceStatus"> <el-table-column width="150" label="设备状态" prop="deviceStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="scope.row.deviceStatus" :label="1" disabled="true"> <el-tag :type="statusFilterType(scope.row.maStatus)">
正常 {{deviceStatus[scope.row.maStatus]}}
</el-radio> </el-tag>
<el-radio v-model="scope.row.deviceStatus" :label="0" disabled="true">
异常
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" label="养护备注" prop="remark"> <el-table-column width="200" label="养护备注" prop="remark">
@ -145,6 +140,14 @@ export default {
1: "未审核", 1: "未审核",
2: "已审核" 2: "已审核"
}, },
status:{
0:"未养护",
1:"已养护",
},
deviceStatus:{
1:"正常",
0:"异常",
},
detailList: [], detailList: [],
detailLoading: false, detailLoading: false,
detailQuery: { detailQuery: {
@ -237,6 +240,15 @@ export default {
this.detailTotal = 0; this.detailTotal = 0;
}); });
}, },
statusFilterType(status){
const statusMap ={
1:"success",
0:"danger"
}
return statusMap[status];
},
}, },
mounted() { mounted() {
document.body.ondrop = function (event) { document.body.ondrop = function (event) {

@ -118,6 +118,7 @@
:loading="corpLoading" :loading="corpLoading"
@change="corpChange" @change="corpChange"
style="width: 90%" style="width: 90%"
@clear="getcorp"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
@ -293,6 +294,7 @@ export default {
limit: 10, limit: 10,
}; };
this.getList(); this.getList();
this.findMethod();
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
@ -374,6 +376,9 @@ export default {
this.findMethod(value); this.findMethod(value);
} }
}, },
getcorp(){
this.findMethod();
},
detailDialog(row) { detailDialog(row) {
this.detailDialogVisible = true; this.detailDialogVisible = true;
this.inputQuery = { this.inputQuery = {

@ -117,6 +117,7 @@
:loading="corpLoading" :loading="corpLoading"
@change="corpChange" @change="corpChange"
style="width: 90%" style="width: 90%"
@clear="getcorp"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
@ -314,6 +315,7 @@ export default {
limit: 10, limit: 10,
}; };
this.getList(); this.getList();
this.findMethod();
}, },
keyup_submit(event) { keyup_submit(event) {
@ -391,6 +393,9 @@ export default {
this.findMethod(value); this.findMethod(value);
} }
}, },
getcorp(){
this.findMethod();
},
detailDialog(row) { detailDialog(row) {
this.inputQuery = { this.inputQuery = {
code: row.code, code: row.code,

@ -117,6 +117,7 @@
:loading="corpLoading" :loading="corpLoading"
@change="corpChange" @change="corpChange"
style="width: 90%" style="width: 90%"
@clear="getcorp"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
@ -288,6 +289,7 @@ export default {
invCode: null, invCode: null,
}; };
this.getList(); this.getList();
this.findMethod();
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
@ -370,6 +372,9 @@ export default {
this.findMethod(value); this.findMethod(value);
} }
}, },
getcorp(){
this.findMethod();
},
detailDialog(row) { detailDialog(row) {
this.detailDialogVisible = true; this.detailDialogVisible = true;
this.inputQuery = { this.inputQuery = {

@ -162,7 +162,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/login.jpg");
background-size: cover; background-size: cover;
} }

@ -2,7 +2,7 @@
<div class="login-container"> <div class="login-container">
<div class="textTitle"> <div class="textTitle">
<!-- <h3 class="toptitle">平潭协和医院</h3>--> <!-- <h3 class="toptitle">平潭协和医院</h3>-->
<h3 class="toptitle">漳州市中医院</h3> <h3 class="toptitle">{{ title }}</h3>
<h3 class="topSubtitle">医院UDI管理系统</h3> <h3 class="topSubtitle">医院UDI管理系统</h3>
</div> </div>
<el-form <el-form
@ -12,6 +12,7 @@
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"
label-position="left" label-position="left"
@submit.native.prevent
> >
<el-card class="box-card"> <el-card class="box-card">
<div style="text-align: center; margin-top: 10px"> <div style="text-align: center; margin-top: 10px">
@ -98,6 +99,7 @@ import Verify from "vue2-verify";
import axios from "axios"; import axios from "axios";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import {decrypt, encrypt} from "@/utils/jsencrypt"; import {decrypt, encrypt} from "@/utils/jsencrypt";
import {getCodeImg, getTitleConfig} from "@/api/login";
export default { export default {
data() { data() {
@ -134,6 +136,7 @@ export default {
showDialog: false, // dialog showDialog: false, // dialog
redirect: null, // redirect: null, //
hospName: "", hospName: "",
title: "福建省XXX医院"
}; };
}, },
methods: { methods: {
@ -238,6 +241,11 @@ export default {
} }
}); });
}, },
getTitleConfig() {
getTitleConfig().then(res => {
this.title = res.data.title;
});
},
}, },
components: { components: {
Verify, Verify,
@ -249,7 +257,7 @@ export default {
// URL Encode // URL Encode
this.redirect = decodeURIComponent(query.redirect); this.redirect = decodeURIComponent(query.redirect);
} }
this.getTitleConfig();
axios.get("./config.json").then((res) => { axios.get("./config.json").then((res) => {
this.hospName = res.data.hosp_name; this.hospName = res.data.hosp_name;
}); });

@ -1,513 +1,521 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购单号"> <el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input> <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购部门"> <el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList" style="width: 90%"> <el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList"
<el-option style="width: 90%">
v-for="item in deptList" <el-option
:key="item.code" v-for="item in deptList"
:label="item.name" :key="item.code"
:value="item.code" :label="item.name"
> :value="item.code"
<span style="float: left">{{ item.name }}</span> >
</el-option> <span style="float: left">{{ item.name }}</span>
</el-select> </el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购仓库"> <el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库"> <el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
<el-option <el-option
v-for="item in invList" v-for="item in invList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency"> <el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> <el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option> <el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option> <el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option> <el-option label="特急" :value=3></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="创建时间:"> <el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%" style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据</el-button> <el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据
</el-button-group> </el-button>
</div> </el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border highlight-current-row <el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border
:default-sort="defaultSort" @sort-change="handleSortChange"> highlight-current-row
<el-table-column label="序号" type="index" width="60"></el-table-column> :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="申购单号" prop="billNo"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column> <el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column> <el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" > <el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<template slot-scope="scope"> <el-table-column label="紧急程度" prop="emergency">
{{ emergencyMap[scope.row.emergency] }} <template slot-scope="scope">
</template> {{ emergencyMap[scope.row.emergency] }}
</el-table-column> </template>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column> </el-table-column>
<el-table-column label="单据状态" prop="status"> <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<template slot-scope="scope"> <el-table-column label="单据状态" prop="status">
<el-tag :type="(scope.row.status) | statusFilterType"> <template slot-scope="scope">
{{ statusMap[scope.row.status] }} <el-tag :type="(scope.row.status) | statusFilterType">
</el-tag> {{ statusMap[scope.row.status] }}
</template> </el-tag>
</el-table-column> </template>
<el-table-column label="备注" prop="remark"></el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" <el-table-column label="备注" prop="remark"></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> <el-table-column label="创建时间" prop="createTime"
<el-table-column label="操作" width="120px"> sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<template slot-scope="scope"> <el-table-column label="操作" width="120px">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑</el-button> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
</template> </el-button>
</el-table-column> <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</el-table> </template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column> <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column> <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column> <el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column> <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="供应商" prop="supName"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:visible.sync="newSpDistributionVisible" :visible.sync="newSpDistributionVisible"
width="80%" width="80%"
v-if="newSpDistributionVisible" v-if="newSpDistributionVisible"
@close='closeDialog' @close='closeDialog'
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:before-close ="handleClose" :before-close="handleClose"
> >
<pureApplyEdit <pureApplyEdit
:closeDialog="closeDialog" :closeDialog="closeDialog"
:idQuery="idQuery" :idQuery="idQuery"
v-on:cancelDialog="getId" v-on:cancelDialog="getId"
:isChang="isChang" :isChang="isChang"
></pureApplyEdit> ></pureApplyEdit>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pureApplyEdit from "./purApplyEditDiaolog"; import pureApplyEdit from "./purApplyEditDiaolog";
import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply"; import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply";
import { getInvListByUser } from '@/api/system/invWarehouse' import {getInvListByUser} from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept' import {filterDepts, getDeptListByUser} from '@/api/auth/authDept'
import {filterSubAll} from "@/api/system/invSubWarehouse"; import {filterGroupBySpuse, filterSubAll} from "@/api/system/invSubWarehouse";
export default { export default {
data() { data() {
return { return {
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: true,
pId:null, pId: null,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
billNo: "", billNo: "",
originType: null, originType: null,
thirdSysFk: "", thirdSysFk: "",
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
emergency:'', emergency: '',
targetDeptCode:'', targetDeptCode: '',
targetInvCode:null targetInvCode: null
}, },
isChang:false, isChang: false,
formName: null, formName: null,
formMap: { formMap: {
add: "新增申购单据", add: "新增申购单据",
update: "编辑申购单据", update: "编辑申购单据",
}, },
statusMap: { statusMap: {
1: "草稿", 1: "草稿",
2: "未审核", 2: "未审核",
3: "已审核", 3: "已审核",
4: "已拒绝" 4: "已拒绝"
},
emergencyMap: {
1: "正常",
2: "较急",
3: "特急",
},
idQuery: {},
total: 0,
thirdSys: [],
invList: {},
invCodebe: null,
deptList: {},
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
createTimes: null,
detailLoading: false,
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}, },
emergencyMap:{ },
1: "正常", {
2: "较急", text: "最近一个月",
3: "特急", onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}, },
idQuery: {}, },
total: 0, {
thirdSys: [], text: "最近三个月",
invList:{}, onClick(picker) {
invCodebe:null, const end = new Date();
deptList:{}, const start = new Date();
thirdSysDetail: null, start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
busTypes: [], picker.$emit("pick", [start, end]);
originTypes: [],
list: [],
createTimes:null,
detailLoading: false,
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
}, },
}; },
}, ],
},
};
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
let deptCode = this.filterQuery.targetDeptCode let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = { this.filterQuery = {
billNo: "", billNo: "",
thirdSysFk: "", thirdSysFk: "",
billFlag: null, billFlag: null,
billAction: null, billAction: null,
startDate: null, startDate: null,
endDate: null, endDate: null,
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
targetInvCode:null targetInvCode: null
}; };
this.initActDateRange() this.initActDateRange()
if(deptCode!=this.invCodebe){ if (deptCode != this.invCodebe) {
this.getInvList() this.getInvList()
} }
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
}, },
getId(id){ getId(id) {
if( this.formName=='add' && id!=null){ if (this.formName == 'add' && id != null) {
var data={ var data = {
id:id id: id
}
this.pId=id
//
delApplyDetailAll(data).then((response)=>{
if(response.code==20000){
this.newSpDistributionVisible=false
}
});
}else{
this.newSpDistributionVisible=false
} }
this.pId = id
//
delApplyDetailAll(data).then((response) => {
if (response.code == 20000) {
this.newSpDistributionVisible = false
}
});
} else {
this.newSpDistributionVisible = false
}
}, },
onSubmitFind() { onSubmitFind() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
handleSortChange(column, prop, order) { handleSortChange(column, prop, order) {
if (column.order === 'descending') { if (column.order === 'descending') {
this.filterQuery.sort = 'desc' this.filterQuery.sort = 'desc'
} else { } else {
this.filterQuery.sort = 'asc' this.filterQuery.sort = 'asc'
} }
this.filterQuery.orderBy = column.prop; this.filterQuery.orderBy = column.prop;
this.getList(); this.getList();
}, },
getList() { getList() {
if (this.actDateRange != null) { if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0]; this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1]; this.filterQuery.endDate = this.actDateRange[1];
} else { } else {
this.filterQuery.startDate = null; this.filterQuery.startDate = null;
this.filterQuery.endDate = null; this.filterQuery.endDate = null;
} }
this.loading = true; this.loading = true;
console.log(this.filterQuery) console.log(this.filterQuery)
listApply(this.filterQuery) listApply(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.detailList=[] this.detailList = []
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.detailLoading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.detailLoading = false;
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
handleClose(){
if( this.formName=='add'){
this.isChang=!this.isChang
}else{
this.newSpDistributionVisible=false
} }
}, this.loading = false;
submitOrder(row) { })
this.loading = true; .catch(() => {
let tQuery = { this.loading = false;
editStatus: 2, this.list = [];
purApplyEntity: row, this.total = 0;
} });
inserThrOrderWeb(tQuery) },
.then(response => { handleDetail(row) {
this.loading = false; let query = {orderIdFk: row.id};
if (response.code === 20000) { this.detailLoading = true;
this.$message.success("提交成功!"); listApplyDetail(query) //
this.getList(); .then((response) => {
} else { this.detailList = response.data.list || [];
this.$message.error(response.message); this.detailLoading = false;
} })
}) .catch(() => {
.catch(() => { this.detailLoading = false;
this.loading = false; this.detailList = [];
}) });
}, },
deleteDialog(row) { handleClose() {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { if (this.formName == 'add') {
confirmButtonText: "确定", this.isChang = !this.isChang
cancelButtonText: "取消", } else {
type: "warning", this.newSpDistributionVisible = false
}) }
.then(() => { },
delApply(row.id) submitOrder(row) {
.then((response) => { this.loading = true;
this.loading = false; let tQuery = {
if (response.code == 20000) { editStatus: 2,
this.$message.success("删除成功"); purApplyEntity: row,
this.getList(); }
} else { inserThrOrderWeb(tQuery)
this.$message.error(response.message); .then(response => {
} this.loading = false;
}) if (response.code === 20000) {
.catch(() => { this.$message.success("提交成功!");
this.loading = false;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList(); this.getList();
}, } else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
closeDialog() { })
this.newSpDistributionVisible = false; .catch(() => {
this.getList(); });
this.detailList = []; },
}, handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
getInvList() {
var query={
parentId:this.filterQuery.targetDeptCode
}
this.filterQuery.targetInvCode = null
this.$forceUpdate()
filterSubAll(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
if(this.deptList.length>0){
this.filterQuery.targetDeptCode=this.deptList[0].code
this.invCodebe=this.filterQuery.targetDeptCode
}
this.getList();
this. getInvList();
});
},
initActDateRange(){
let end = new Date(); newDistributionForm(index, row) {
let start = new Date(); this.idQuery.id = '';
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.actDateRange = [start, end]; this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "update";
} else
this.formName = "add";
this.newSpDistributionVisible = true;
},
getInvList() {
var query = {
parentId: this.filterQuery.targetDeptCode,
spUse: true,
}
this.filterQuery.targetInvCode = null
this.$forceUpdate()
filterGroupBySpuse(query).then((res) => {
this.invList = res.data || [];
})
},
getDeptList() {
let query = {
spUse: true,
};
filterDepts(query).then((res) => {
this.deptList = res.data || [];
if (this.deptList.length > 0) {
this.filterQuery.targetDeptCode = this.deptList[0].code
this.invCodebe = this.filterQuery.targetDeptCode
} }
this.getList();
this.getInvList();
});
},
initActDateRange() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
} }
,
components: { }
pureApplyEdit, ,
} components: {
, pureApplyEdit,
filters: { }
statusFilterType(status) { ,
const statusMap = { filters: {
1: "warning", statusFilterType(status) {
2: "success", const statusMap = {
}; 1: "warning",
return statusMap[status]; 2: "success",
} };
, return statusMap[status];
}
,
mounted() {
}
,
created() {
this.initActDateRange()
this.getDeptList();
} }
, ,
}
,
mounted() {
}
,
created() {
this.initActDateRange()
this.getDeptList();
}
,
} }
; ;
</script> </script>
<style scoped> <style scoped>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 25%; width: 25%;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -61,7 +61,7 @@
<el-row style="margin-top: -10px"> <el-row style="margin-top: -10px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="申购仓库:" prop="locStorageCode"> <el-form-item label="申购仓库:" prop="locStorageCode">
<el-select v-model="formData.targetInvCode" placeholder="请选择当前申购仓库" @change="setWarehouseName" <el-select v-model="formData.targetInvCode" placeholder="请选择申购仓库" @change="setWarehouseName"
style="width: 90%" clearable> style="width: 90%" clearable>
<el-option <el-option
v-for="item in subInvList" v-for="item in subInvList"
@ -97,7 +97,7 @@
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button>
<!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button>--> <!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button>-->
</el-button-group> </el-button-group>
</el-button-group> </el-button-group>
</el-row> </el-row>
@ -184,7 +184,7 @@ import {
addApplyId, addApplyId,
updateDetail updateDetail
} from "@/api/purchase/purApply"; } from "@/api/purchase/purApply";
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {filterGroupBySpuse, filterSubByInv} from "@/api/system/invSubWarehouse";
import {addPlanId} from "@/api/purchase/purPlan"; import {addPlanId} from "@/api/purchase/purPlan";
import SelectRecelveListDialog from "@/views/inout/receive/selectReveiceListDialog"; import SelectRecelveListDialog from "@/views/inout/receive/selectReveiceListDialog";
import {parseTime} from "@/utils/coTools"; import {parseTime} from "@/utils/coTools";
@ -297,7 +297,7 @@ export default {
if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) { if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
return this.$message.error("到货时间不能为空!"); return this.$message.error("到货时间不能为空!");
} }
if (this.formData.arrivalTime<this.formData.createTime) { if (this.formData.arrivalTime < this.formData.createTime) {
return this.$message.error("到货时间不能比单据日期早!!!"); return this.$message.error("到货时间不能比单据日期早!!!");
} }
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
@ -426,7 +426,7 @@ export default {
} }
}, },
deleteCodeArray(index, row) { deleteCodeArray(index, row) {
this.orderEditor=true; this.orderEditor = true;
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -489,9 +489,10 @@ export default {
findSubInvs() { findSubInvs() {
this.subInvList = []; this.subInvList = [];
let query = { let query = {
filter: 3 filter: 3,
spUse: true,
}; };
filterSubByInv(query) filterGroupBySpuse(query)
.then((response) => { .then((response) => {
this.subInvList = response.data || []; this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) { if (this.subInvList != null && this.subInvList.length == 1) {

@ -3,7 +3,7 @@
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="listQuery" label-width="120px" v-show="showSearch"> <el-form :model="listQuery" label-width="120px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="15"> <el-col :span="18">
<el-form-item label="UDI码:" class="query-form-item"> <el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" <el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input> @keyup.enter.native="keyup_submit($event)"></el-input>
@ -12,26 +12,26 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物资简称:" class="query-form-item"> <el-form-item label="拼音简写:" class="query-form-item">
<el-input v-model="listQuery.pinyinInitial" @input="search" style="width: 90%" placeholder="请输入物资拼音简写" <el-input v-model="listQuery.pinyinInitial" @input="search" style="width: 100%" placeholder="请输入物资拼音简写"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第三方物资编码:" class="query-form-item"> <el-form-item label="第三方物资编码:" class="query-form-item">
<el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="第三方物资编码" <el-input v-model="listQuery.thrPiId" style="width: 100%" placeholder="第三方物资编码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="分类编码:" class="query-form-item"> <el-form-item label="分类编码:" class="query-form-item">
<el-input v-model="listQuery.flbm" style="width: 90%" placeholder="请输入分类编码" <el-input v-model="listQuery.flbm" style="width: 100%" placeholder="请输入分类编码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商:" class="query-form-item"> <el-form-item label="供应商:" class="query-form-item">
<el-input v-model="listQuery.companyName" style="width: 90%" placeholder="请输入供应商" <el-input v-model="listQuery.companyName" style="width: 100%" placeholder="请输入供应商"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -39,24 +39,39 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物品编码:" class="query-form-item"> <el-form-item label="物品编码:" class="query-form-item">
<el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" <el-input v-model="listQuery.unionCode" style="width: 100%" placeholder="请输入DI/医保编码/商品条码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="产品通用名:" class="query-form-item"> <el-form-item label="产品通用名:" class="query-form-item">
<el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名" <el-input v-model="listQuery.cpmctymc" style="width: 100%" placeholder="请输入产品通用名"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="规格型号:" class="query-form-item"> <el-form-item label="规格型号:" class="query-form-item">
<el-input v-model="listQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input> <el-input v-model="listQuery.ggxh" style="width: 100%" placeholder="请输入规格型号" clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="生产企业:" class="query-form-item"> <el-form-item label="生产企业:" class="query-form-item">
<el-input v-model="listQuery.manufactory" style="width: 90%" placeholder="请输入生产企业/注册备案人" <el-input v-model="listQuery.manufactory" style="width: 100%" placeholder="请输入生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1+':'" class="query-form-item">
<el-input v-model="listQuery.basicPrductRemak1" style="width: 100%" :placeholder="productRemarkSet.remarkTitle1"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 +':'" class="query-form-item">
<el-input v-model="listQuery.basicPrductRemak2" style="width: 100%" :placeholder="productRemarkSet.remarkTitle2"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -109,7 +124,6 @@
></pagination> ></pagination>
</el-card> </el-card>
<el-dialog <el-dialog
title="耗材字典详情" title="耗材字典详情"
:visible.sync="udiRlDetailVisible" :visible.sync="udiRlDetailVisible"
@ -126,7 +140,10 @@
<el-form :model="form"> <el-form :model="form">
<el-form-item label="" prop="isGive"> <el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert"> <el-radio-group v-model="currentCert">
<el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio> <el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{
item
}}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -144,6 +161,7 @@ import {filterCompanyProductplanRelevance, filterCompanyProductRelevance} from "
import {addApplyDetail, addApply} from "../../../api/purchase/purApply"; import {addApplyDetail, addApply} from "../../../api/purchase/purApply";
import store from "../../../store"; import store from "../../../store";
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog"; import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
import {finProductSet} from "@/api/param/systemParamConfig";
export default { export default {
name: "stockOrderNewSelectProduct", name: "stockOrderNewSelectProduct",
@ -211,6 +229,7 @@ export default {
orderIdFk: "", orderIdFk: "",
supId: "", supId: "",
}, },
productRemarkSet: {},
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
{ {
@ -353,7 +372,6 @@ export default {
this.$message.error('未选择产品'); this.$message.error('未选择产品');
return; return;
} }
debugger
// if (this.ids.length > 0) { // if (this.ids.length > 0) {
// for (var i = 0; i < this.ids.length; i++) { // for (var i = 0; i < this.ids.length; i++) {
// if (this.ids[i] == this.multipleSelection.id) { // if (this.ids[i] == this.multipleSelection.id) {
@ -401,13 +419,19 @@ export default {
this.multipleSelection.zczbhhzbapzbh = this.currentCert; this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine(); this.combine();
} }
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data;
}
});
}, },
}, },
components: {udiRlDetailDialog}, components: {udiRlDetailDialog},
created() { created() {
console.log(this.data) this.findBasicProductSet();
if (this.$isNotBlank(this.data)) { if (this.$isNotBlank(this.data)) {
this.ids = []; this.ids = [];
if (this.data.stockOrderLists.length > 0) { if (this.data.stockOrderLists.length > 0) {
@ -416,13 +440,17 @@ export default {
} }
} }
} }
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.query-form-item {
display: block !important;
margin-right: 1px;
margin-bottom: 5px;
}
div /deep/ .el-table .warning-row { div /deep/ .el-table .warning-row {
background: #bebebe; background: #bebebe;

@ -1,152 +1,156 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购单号"> <el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input> <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购部门"> <el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" style="width: 90%" <el-select v-model="filterQuery.deptCode" placeholder="请选择申购部门" style="width: 90%"
@change="getInvList" @change="getInvList"
> >
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
:key="item.code" :key="item.code"
:label="item.name" :label="item.name"
:value="item.code" :value="item.code"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申购仓库"> <el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" @change="getList" style="width: 90%" clearable placeholder="请选择所属仓库"> <el-select v-model="filterQuery.invCode" @change="getList" style="width: 90%" clearable
<el-option placeholder="请选择所属仓库">
v-for="item in invList" <el-option
:key="item.name" v-for="item in invList"
:label="item.name" :key="item.name"
:value="item.code"> :label="item.name"
<span style="float: left">{{ item.name }}</span> :value="item.code">
</el-option> <span style="float: left">{{ item.name }}</span>
</el-select> </el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
</el-row> </el-col>
</el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="紧急程度:" prop="emergency"> <el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable> <el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option> <el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option> <el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option> <el-option label="特急" :value=3></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="创建时间:"> <el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%" style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @current-change="handleDetail" <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
:default-sort="defaultSort" @sort-change="handleSortChange"> @current-change="handleDetail"
<el-table-column label="序号" type="index" width="60"></el-table-column> :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="申购单号" prop="billNo"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column> <el-table-column label="申购单号" prop="billNo"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column> <el-table-column label="申购部门" prop="deptName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" > <el-table-column label="申购仓库" prop="invName"></el-table-column>
<template slot-scope="scope"> <el-table-column label="紧急程度" prop="emergency">
{{ emergencyMap[scope.row.emergency] }} <template slot-scope="scope">
</template> {{ emergencyMap[scope.row.emergency] }}
</el-table-column> </template>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column> </el-table-column>
<el-table-column label="单据状态" prop="status"> <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
<template slot-scope="scope"> <el-table-column label="单据状态" prop="status">
<el-tag :type="(scope.row.status) | statusFilterType"> <template slot-scope="scope">
{{ statusMap[scope.row.status] }} <el-tag :type="(scope.row.status) | statusFilterType">
</el-tag> {{ statusMap[scope.row.status] }}
</template> </el-tag>
</el-table-column> </template>
<el-table-column label="创建时间" prop="createTime" </el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> <el-table-column label="创建时间" prop="createTime"
<el-table-column label="操作" width="60px"> sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<template slot-scope="scope"> <el-table-column label="操作" width="60px">
<el-button type="text" :disabled="scope.row.status!=2" @click.native="newDistributionForm(scope.$index, scope.row)">审核</el-button> <template slot-scope="scope">
</template> <el-button type="text" :disabled="scope.row.status!=2"
</el-table-column> @click.native="newDistributionForm(scope.$index, scope.row)">审核
</el-table> </el-button>
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column> <el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column> <el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column> <el-table-column label="申购数量" prop="count"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column> <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="供应商" prop="supName"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:visible.sync="newSpDistributionVisible" :visible.sync="newSpDistributionVisible"
width="80%" width="80%"
v-if="newSpDistributionVisible" v-if="newSpDistributionVisible"
@close='closeDialog' @close='closeDialog'
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
> >
<pureApplyDetail <pureApplyDetail
:closeDialog="closeDialog" :closeDialog="closeDialog"
:idQuery="idQuery" :idQuery="idQuery"
:editType="editType" :editType="editType"
></pureApplyDetail> ></pureApplyDetail>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pureApplyDetail from "./pureApplyDetailDialog"; import pureApplyDetail from "./pureApplyDetailDialog";
@ -156,321 +160,323 @@ import {getDeptListByUser} from "@/api/auth/authDept";
import {filterSubAll} from "@/api/system/invSubWarehouse"; import {filterSubAll} from "@/api/system/invSubWarehouse";
export default { export default {
data() { data() {
return { return {
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
billAction: null, billAction: null,
billNo: "", billNo: "",
originType: null, originType: null,
thirdSysFk: "", thirdSysFk: "",
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
emergency:'', emergency: '',
targetDeptCode:'', targetDeptCode: '',
targetInvCode: null targetInvCode: null,
}, deptCode: null,
formName: null, invCode: null,
formMap: { },
add: "新增申购单据", formName: null,
update: "审核申购单据", formMap: {
}, add: "新增申购单据",
statusMap: { update: "审核申购单据",
1: "草稿", },
2: "未审核", statusMap: {
3: "已审核", 1: "草稿",
4: "已拒绝" 2: "未审核",
3: "已审核",
4: "已拒绝"
},
emergencyMap: {
1: "正常",
2: "较急",
3: "特急",
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
invCodebe: null,
thirdSysDetail: null,
busTypes: [],
originTypes: [],
invList: {},
deptList: {},
list: [],
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}, },
emergencyMap:{ },
1: "正常", {
2: "较急", text: "最近一个月",
3: "特急", onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}, },
idQuery: {}, },
editType: 1, {
total: 0, text: "最近三个月",
thirdSys: [], onClick(picker) {
invCodebe:null, const end = new Date();
thirdSysDetail: null, const start = new Date();
busTypes: [], start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
originTypes: [], picker.$emit("pick", [start, end]);
invList:{},
deptList:{},
list: [],
detailList: [],
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
}, },
}; },
}, ],
},
};
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
let deptCode = this.filterQuery.targetDeptCode let deptCode = this.filterQuery.targetDeptCode
this.filterQuery = { this.filterQuery = {
billNo: "", billNo: "",
thirdSysFk: "", thirdSysFk: "",
billFlag: null, billFlag: null,
billAction: null, billAction: null,
startDate: null, startDate: null,
endDate: null, endDate: null,
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
targetDeptCode: this.invCodebe, targetDeptCode: this.invCodebe,
targetInvCode: null targetInvCode: null
}; };
if(deptCode!=this.invCodebe){ if (deptCode != this.invCodebe) {
this.getInvList() this.getInvList()
} }
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
onSubmitFind() { onSubmitFind() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
handleSortChange(column, prop, order) { handleSortChange(column, prop, order) {
if (column.order === 'descending') { if (column.order === 'descending') {
this.filterQuery.sort = 'desc' this.filterQuery.sort = 'desc'
} else { } else {
this.filterQuery.sort = 'asc' this.filterQuery.sort = 'asc'
} }
this.filterQuery.orderBy = column.prop; this.filterQuery.orderBy = column.prop;
this.getList(); this.getList();
}, },
getList() { getList() {
if (this.actDateRange != null) { if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0]; this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1]; this.filterQuery.endDate = this.actDateRange[1];
} else { } else {
this.filterQuery.startDate = null; this.filterQuery.startDate = null;
this.filterQuery.endDate = null; this.filterQuery.endDate = null;
} }
this.loading = true; this.loading = true;
auditListApply(this.filterQuery) auditListApply(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.detailList=[] this.detailList = []
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
handleDetail(row) { handleDetail(row) {
let query = {orderIdFk: row.id}; let query = {orderIdFk: row.id};
this.loading = true; this.loading = true;
listApplyDetail(query) // listApplyDetail(query) //
.then((response) => { .then((response) => {
this.detailList = response.data.list || []; this.detailList = response.data.list || [];
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.detailList = []; this.detailList = [];
this.total = 0; this.total = 0;
}); });
}, },
submitOrder(row) { submitOrder(row) {
this.loading = true; this.loading = true;
let tQuery = { let tQuery = {
editStatus: 2, editStatus: 2,
purApplyEntity: row, purApplyEntity: row,
} }
auditOrder(tQuery) auditOrder(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功!"); this.$message.success("提交成功!");
this.getList(); this.getList();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}) })
}, },
deleteDialog(row) { deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
})
.then(() => {
delApply(row.id)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
}) })
.then(() => { .catch(() => {
delApply(row.id) this.loading = false;
.then((response) => { });
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
}) })
.catch(() => { .catch(() => {
}); });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
this.getList(); this.getList();
}, },
closeDialog() { closeDialog() {
this.newSpDistributionVisible = false; this.newSpDistributionVisible = false;
this.getList(); this.getList();
this.detailList = []; this.detailList = [];
}, },
newDistributionForm(index, row) { newDistributionForm(index, row) {
this.idQuery.id = ''; this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id; this.idQuery.id = row.id;
this.idQuery.formData = row; this.idQuery.formData = row;
this.formName = "update"; this.formName = "update";
} else } else
this.formName = "add"; this.formName = "add";
this.newSpDistributionVisible = true; this.newSpDistributionVisible = true;
}, },
deptChange(){ deptChange() {
this. getInvList(); this.getInvList();
this.getList(); this.getList();
}, },
getInvList() { getInvList() {
var query={ var query = {
parentId:this.filterQuery.targetDeptCode parentId: this.filterQuery.targetDeptCode
} }
this.filterQuery.targetInvCode = null this.filterQuery.targetInvCode = null
filterSubAll(query).then((res) => { filterSubAll(query).then((res) => {
this.invList = res.data || []; this.invList = res.data || [];
}) })
}, },
getDeptList() { getDeptList() {
filterAll().then((res) => { filterAll().then((res) => {
this.deptList = res.data || []; this.deptList = res.data || [];
this. getInvList(); this.getInvList();
this.getList(); this.getList();
}); });
}, },
} }
, ,
components: { components: {
pureApplyDetail, pureApplyDetail,
} }
, ,
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
2: "warning", 2: "warning",
3: "success", 3: "success",
4: "danger", 4: "danger",
}; };
return statusMap[status]; return statusMap[status];
}
,
}
,
mounted() {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getDeptList();
} }
, ,
}
,
mounted() {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getDeptList();
}
,
} }
; ;
</script> </script>
<style scoped> <style scoped>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 25%; width: 25%;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -104,18 +104,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column> <el-table-column label="到货截止" prop="arrivalTime" ></el-table-column>
<el-table-column label="单据状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" <el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
<el-table-column label="审核时间" prop="auditTime" <el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
<el-table-column label="状态" prop="status"> <el-table-column label="审核人" prop="auditByName"></el-table-column>
<el-table-column label="审核状态" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType"> <el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }} {{ statusMap[scope.row.status] }}

@ -81,17 +81,19 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange"> @current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column> <el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column> <el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column> <el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="紧急程度" prop="emergency"> <el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }} {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status"> <el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType"> <el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }} {{ statusMap[scope.row.status] }}
@ -99,10 +101,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" <el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑 <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
</el-button> </el-button>

@ -11,7 +11,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购部门"> <el-form-item label="采购部门">
<el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%"> <el-select v-model="filterQuery.deptCode" @change="getInvList" placeholder="请选择采购部门" style="width: 90%">
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
:key="item.code" :key="item.code"
@ -26,7 +26,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购仓库"> <el-form-item label="采购仓库">
<el-select v-model="filterQuery.invCode" clearable style="width: 90%" placeholder="请选择所属仓库"> <el-select v-model="filterQuery.invCode" clearable style="width: 90%" placeholder="请选择所属仓库">
<el-option <el-option
v-for="item in invList" v-for="item in invList"
:key="item.name" :key="item.name"
@ -78,19 +78,22 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange"> @current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column> <el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column> <el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column> <el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="紧急程度" prop="emergency"> <el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="审核人" prop="auditUserName"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }} {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status"> <el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType"> <el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }} {{ statusMap[scope.row.status] }}
@ -98,8 +101,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" <el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作" width="60px"> <el-table-column label="操作" width="60px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" :disabled="scope.row.status!=2" <el-button type="text" :disabled="scope.row.status!=2"
@click.native="newDistributionForm(scope.$index, scope.row)">审核 @click.native="newDistributionForm(scope.$index, scope.row)">审核
@ -173,11 +176,11 @@ export default {
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
emergency:'', emergency: '',
deptCode:'', deptCode: '',
}, },
formName: null, formName: null,
invCodebe:null, invCodebe: null,
formMap: { formMap: {
add: "新增采购计划", add: "新增采购计划",
update: "采购计划审核", update: "采购计划审核",
@ -188,7 +191,7 @@ export default {
3: "已审核", 3: "已审核",
4: "已拒绝" 4: "已拒绝"
}, },
emergencyMap:{ emergencyMap: {
1: "正常", 1: "正常",
2: "较急", 2: "较急",
3: "特急", 3: "特急",
@ -297,7 +300,7 @@ export default {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.detailList=[] this.detailList = []
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
@ -358,8 +361,8 @@ export default {
this.detailList = []; this.detailList = [];
}, },
getInvList() { getInvList() {
var query={ var query = {
parentId:this.filterQuery.deptCode parentId: this.filterQuery.deptCode
} }
filterSubAll(query).then((res) => { filterSubAll(query).then((res) => {
this.invList = res.data || []; this.invList = res.data || [];
@ -368,12 +371,12 @@ export default {
getDeptList() { getDeptList() {
getDeptListByUser().then((res) => { getDeptListByUser().then((res) => {
this.deptList = res.data || []; this.deptList = res.data || [];
if(this.deptList.length>0){ if (this.deptList.length > 0) {
this.filterQuery.deptCode=this.deptList[0].code this.filterQuery.deptCode = this.deptList[0].code
this.invCodebe=this.filterQuery.deptCode this.invCodebe = this.filterQuery.deptCode
} }
this.getList(); this.getList();
this. getInvList(); this.getInvList();
}); });
}, },

@ -94,19 +94,22 @@
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true" <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange" > @current-change="handleDetail" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo"></el-table-column> <el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName"></el-table-column> <el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column> <el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="紧急程度" prop="emergency"> <el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="审核人" prop="auditUserName"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }} {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column> <el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="状态" prop="status"> <el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusFilterType"> <el-tag :type="(scope.row.status) | statusFilterType">
{{ statusMap[scope.row.status] }} {{ statusMap[scope.row.status] }}
@ -114,12 +117,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" <el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="审核时间" prop="auditTime" <el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column> sortable="custom" :sort-orders="['ascending', 'descending']" width="160"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" width="60px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除

@ -116,7 +116,10 @@
<el-form :model="form"> <el-form :model="form">
<el-form-item label="" prop="isGive"> <el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert"> <el-radio-group v-model="currentCert">
<el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio> <el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{
item
}}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -175,6 +178,9 @@ export default {
limit: 10, limit: 10,
zczbhhzbapzbh: null, zczbhhzbapzbh: null,
manufactory: null, manufactory: null,
basicPrductRemak1: null,
basicPrductRemak2: null,
}, },
combineQuery: { combineQuery: {
thirdId: "", thirdId: "",
@ -351,7 +357,7 @@ export default {
orderIdFk: this.pId, orderIdFk: this.pId,
supId: this.multipleSelection.customerId, supId: this.multipleSelection.customerId,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh, zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh,
price:this.multipleSelection.price price: this.multipleSelection.price
}; };
addOrderDetail(tQuery).then((response) => { addOrderDetail(tQuery).then((response) => {
this.loading = false; this.loading = false;

@ -154,7 +154,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/login.jpg");
background-size: cover; background-size: cover;
} }
.title { .title {

@ -4,6 +4,7 @@
<el-transfer v-model="value" :data="data" <el-transfer v-model="value" :data="data"
class="edit_dev" class="edit_dev"
@change="transferChange" @change="transferChange"
@mouseover.native="addTitle"
filterable filterable
:titles="['未选入单据类型', '已选入单据类型']" :titles="['未选入单据类型', '已选入单据类型']"
@ -123,6 +124,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
addTitle(e) {
// title
let target_el = e.target;
if (target_el.title) return;
target_el.title = target_el.innerText;
},
transferChange(value, direction, keyArr) { transferChange(value, direction, keyArr) {
this.keyArr=value; this.keyArr=value;

@ -102,7 +102,8 @@
<el-row type="flex"> <el-row type="flex">
<el-col :span="11" type="flex"> <el-col :span="11" type="flex">
<el-form-item label="用户账号" prop="userName"> <el-form-item label="用户账号" prop="userName">
<el-input v-model="formData.userName" size="small" style="width: 90%" :disabled="formData.id == 1"></el-input> <el-input v-model="formData.userName" size="small" style="width: 90%"
:disabled="formData.id == 1"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" class="el-col"> <el-col :span="11" class="el-col">
@ -206,7 +207,7 @@
<el-row :gutter="20" type="flex"> <el-row :gutter="20" type="flex">
<el-col :span="11" type="flex"> <el-col :span="11" type="flex">
<el-form-item label="角色" prop="roles"> <el-form-item label="角色" prop="roles">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1" > <el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1">
<el-checkbox <el-checkbox
v-for="item in roles" v-for="item in roles"
:key="item.roleId" :key="item.roleId"
@ -258,7 +259,7 @@ import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {listRole} from "@/api/system/role"; import {listRole} from "@/api/system/role";
import {selectSysParamByKey} from "@/api/system/systemParamConfig"; import {selectSysParamByKey} from "@/api/system/systemParamConfig";
import {filterList, selectInvById,getDeptById} from '@/api/system/invWarehouse' import {filterList, selectInvById, getDeptById} from '@/api/system/invWarehouse'
const formJson = { const formJson = {
id: "", id: "",
@ -384,7 +385,7 @@ export default {
this.query.page = 1; this.query.page = 1;
this.getList(); this.getList();
}, },
change(){ change() {
this.$forceUpdate(); this.$forceUpdate();
}, },
findInv(val) { findInv(val) {
@ -403,7 +404,7 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.query.key='key'; this.query.key = 'key';
authAdminList(this.query) authAdminList(this.query)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
@ -465,7 +466,7 @@ export default {
roles: row.roles, roles: row.roles,
depts: row.depts, depts: row.depts,
dept: row.dept, dept: row.dept,
locInvCode:row.locInvCode locInvCode: row.locInvCode
}; };
} }
this.formName = "add"; this.formName = "add";
@ -570,10 +571,10 @@ export default {
}; };
filterList(query) filterList(query)
.then((response) => { .then((response) => {
var deptList=[]; var deptList = [];
this.loading = false; this.loading = false;
for(var i=0;i<response.data.list.length;i++){ for (var i = 0; i < response.data.list.length; i++) {
if(response.data.list[i].id!=1){ if (response.data.list[i].id != 1) {
deptList.push(response.data.list[i]); deptList.push(response.data.list[i]);
} }
} }

@ -16,7 +16,6 @@ export default {
var lastTime, nextTime // var lastTime, nextTime //
var lastCode, nextCode // var lastCode, nextCode //
document.onkeypress = (e) => { document.onkeypress = (e) => {
debugger
// //
if (window.event) { // IE if (window.event) { // IE
nextCode = e.keyCode nextCode = e.keyCode

@ -5,7 +5,8 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="产品编码:"> <el-form-item label="产品编码:">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable @keyup.enter.native="keyupErp_submit($event)"></el-input> <el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入产品编码/商品条码/医保编码" clearable
@keyup.enter.native="keyupErp_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -22,7 +23,8 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="注册/备案凭证:"> <el-form-item label="注册/备案凭证:">
<el-input v-model="filterQuery.registerNo" clearable style="width: 90%" placeholder="请输入注册/备案凭证"></el-input> <el-input v-model="filterQuery.registerNo" clearable style="width: 90%"
placeholder="请输入注册/备案凭证"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -48,14 +50,16 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button> <el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true" :disabled="!configParms.basicThirdProducts">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="addProductVisible=true"
</el-button-group> :disabled="!configParms.basicThirdProducts">新增
</div> </el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
@ -69,8 +73,9 @@
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="180px"> <el-table-column label="操作" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.native.stop="detailDialog(scope.row)">详情</el-button> <el-button type="text" @click.native.stop="detailDialog(scope.row)">编辑</el-button>
<el-button type="text" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0" :disabled="!configParms.basicThirdProducts"> <el-button type="text" @click.native.stop="deleteDialog(scope.row)" v-if="thirdSysDetail.fromType!=0"
:disabled="!configParms.basicThirdProducts">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -89,16 +94,17 @@
<el-dialog <el-dialog
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
title="产品信息详情" title="产品信息编辑"
:visible.sync="thrProductsDetailVisible" :visible.sync="thrProductsDetailVisible"
width="60%" width="60%"
class="dialog-two" class="dialog-two"
top="5vh" top="5vh"
v-if="thrProductsDetailVisible" v-if="thrProductsDetailVisible"
> >
<thrProductsDetail <thrProductsEdit
:data="thisData" :newProductData="thisData"
></thrProductsDetail> :closeAddDialog="closeAddDialog"
></thrProductsEdit>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
@ -120,12 +126,13 @@
</div> </div>
</template> </template>
<script> <script>
import {delThrProducts, saveNewProduct import {
delThrProducts, saveNewProduct
} from "@/api/thrsys/thrProducts"; } from "@/api/thrsys/thrProducts";
import {getInvbasdoc} from "@/api/thrsys/getErps"; import {getInvbasdoc} from "@/api/thrsys/getErps";
import {getBasicThirdSys, filterDetailByKey} from "@/api/thrsys/basicThirdSys"; import {getBasicThirdSys, filterDetailByKey} from "@/api/thrsys/basicThirdSys";
import {selectIp} from "@/api/system/systemParamConfig"; import {selectIp} from "@/api/system/systemParamConfig";
import thrProductsDetail from "./thrProductsDetail"; import thrProductsEdit from "./thrProductsEdit";
import ThrProductsAdd from "@/views/thirdSys/product/thrProductsAdd"; import ThrProductsAdd from "@/views/thirdSys/product/thrProductsAdd";
import {findConfig} from "@/api/sync/spsSyncStatus"; import {findConfig} from "@/api/sync/spsSyncStatus";
@ -143,7 +150,7 @@ export default {
page: 1, page: 1,
limit: 20, limit: 20,
}, },
mainThirdSys:'', mainThirdSys: '',
total: 0, total: 0,
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
@ -206,7 +213,7 @@ export default {
this.getList(); this.getList();
}, },
getList() { getList() {
if (this.filterQuery.thirdSys == null ) { if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!") this.$message.warning("请先选择第三方系统!")
return; return;
} }
@ -268,8 +275,8 @@ export default {
getBasicThirdSys(query) getBasicThirdSys(query)
.then((response) => { .then((response) => {
this.thirdSys = response.data.list || []; this.thirdSys = response.data.list || [];
for(var i=0;i<this.thirdSys.length;i++){ for (var i = 0; i < this.thirdSys.length; i++) {
if(this.thirdSys[i].mainSys){ if (this.thirdSys[i].mainSys) {
this.filterQuery.thirdSys = this.thirdSys[i].thirdId; this.filterQuery.thirdSys = this.thirdSys[i].thirdId;
this.mainThirdSys = this.thirdSys[i].thirdId; this.mainThirdSys = this.thirdSys[i].thirdId;
} }
@ -316,6 +323,7 @@ export default {
}) })
}, },
closeAddDialog(val) { closeAddDialog(val) {
this.thrProductsDetailVisible = false;
this.addProductVisible = false; this.addProductVisible = false;
if (val) { if (val) {
this.getList(); this.getList();
@ -334,7 +342,7 @@ export default {
}, },
}, },
components: { components: {
thrProductsDetail, ThrProductsAdd thrProductsEdit, ThrProductsAdd
}, },
mounted() { mounted() {
}, },

@ -0,0 +1,221 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
disabled
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入产品编码"
disabled
v-model.trim="newProductData.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="规格型号:" prop="spec">
<el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入计量单位"
v-model.trim="newProductData.measname"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业"
v-model.trim="newProductData.manufactory"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册证号:" prop="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入注册证号"
v-model.trim="newProductData.registerNo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人"
v-model.trim="newProductData.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称"
v-model.trim="newProductData.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="产品类别:" prop="cplb">
<el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="统一社会信用号:" prop="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
v-model.trim="newProductData.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="器械类别:" prop="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" class="el-col">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述"
v-model.trim="newProductData.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import {updateProduct} from "@/api/thrsys/thrProducts";
import {getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
export default {
name: "thrProductsEdit",
props: {
newProductData: {
type: Object,
required: true,
},
closeAddDialog: {
type: Function,
required: true,
},
},
data() {
return {
thirdSys: [],
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false;
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning("第三方系统不能为空!");
return;
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning("产品编码为空!");
return;
}
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning("产品名称不能为空!");
return;
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning("规格型号不能为空");
return;
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning("计量单位不能为空!");
return;
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning("生产企业不能为空!");
return;
}
if (this.$isBlank(this.newProductData.registerNo)) {
this.$message.warning("注册证号不能为空!");
return;
}
updateProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
this.closeAddDialog(true);
} else {
this.$message.error(res.message);
}
}).catch((error) => {
})
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
created() {
this.getBasicThirdSys();
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save