首映功能完善,领用功能完善,采购管理完善

purchase
anthonyywj2 3 years ago
parent ac15ed8066
commit cac8361e57

@ -0,0 +1,33 @@
import axios from "../../utils/axios";
export function getBusChange(query) {
return axios({
url: "/basic/bustype/change/filter",
method: "get",
params: query
});
}
export function updateBusChange(query) {
return axios({
url: "/basic/bustype/change/update",
method: "post",
data: query
});
}
export function insertBusChange(query) {
return axios({
url: "/basic/bustype/change/insert",
method: "post",
data: query
});
}
export function delBusChange(query) {
return axios({
url: "/basic/bustype/change/delete",
method: "post",
data: query
});
}

@ -116,3 +116,12 @@ export function addStockOrder(query) {
params: query
});
}
export function addReceiveOrder(query) {
return axios({
url: "/udiwms/receive/addStockOrder",
method: "get",
params: query
});
}

@ -0,0 +1,13 @@
import axios from "../../utils/axios";
//--------------获取领用单据-------------------
export function getReceiveOrder(query) {
return axios({
url: "/udiwms/receive/order/filter",
method: "get",
params: query
});
}

@ -0,0 +1,11 @@
import axios from "../../utils/axios";
export function filterClassify(query) {
return axios(
{
url: "/spms/classify/code/filter",
method: "get",
params: query
}
);
}

@ -1,6 +1,6 @@
import axios from "@/utils/axios";
export function listApply(query) {
export function listPlan(query) {
return axios({
url: '/purchase/plan/list',
method: 'get',
@ -8,7 +8,7 @@ export function listApply(query) {
})
}
export function auditListApply(query) {
export function auditListPlan(query) {
return axios({
url: '/purchase/plan/auditList',
method: 'get',

@ -45,3 +45,11 @@ export function auditSupProduct(data) {
})
}
export function bindProduct(data) {
return axios({
url: '/sup/product/selectBind',
method: 'post',
data: data
})
}

@ -7,3 +7,12 @@ export function inserThrOrderWeb(query) {
data: query
});
}
export function updateReceive(query) {
return axios({
url: "/udiwms/receive/order/update",
method: "post",
data: query
});
}

@ -28,6 +28,9 @@ import invWarehouse from "../views/basic/invWarehouse"
import BussinessType from "../views/basic/BussinessType.vue";
import BussinessTypeLocl from "../views/basic/BussinessTypeLocl.vue";
import bussinessTypeThird from "../views/basic/BussinessTypeThird.vue";
import bussinessTypeChange from "../views/basic/BusTypeChange.vue";
import basicUnitMaintain from "../views/basic/CorpMaintain.vue";
import corpImport from "../views/basic/CorpImport.vue";
import corpExport from "../views/basic/CorpExport.vue";
@ -52,6 +55,7 @@ import supProductAudit from "../views/purchase/supProductAudit.vue";
import supProductSearch from "../views/purchase/supProductSearch.vue";
import supCertAudit from "../views/purchase/supCertAudit.vue";
import supCertSearch from "../views/purchase/supCertSearch.vue";
import supCertificationAdd from "../views/purchase/supCertificationAdd.vue";
import UdiInfoSmpUpload from "../views/smp/UdiInfoSmpUpload.vue";
// import ErpOrderSmpUpload from "../views/smp/ErpOrderSmpUpload.vue";
@ -147,7 +151,10 @@ import sysUdimsDownloadData from "../views/thrsys/SysUdimsDownloadData";
import purApply from "../views/purchase/purApply";
import pureApplyAudit from "../views/purchase/pureApplyAudit";
import pureApplySearch from "../views/purchase/pureApplySearch";
import purPlan from "../views/purchase/purPlan";
import purPlanAudit from "../views/purchase/purPlanAudit";
import purPlanSearch from "../views/purchase/purPlanSearch";
// Vue.use(VueRouter);
@ -329,6 +336,15 @@ export const asyncRouterMap = [
authRule: ["system/BussinessTypeLocl"]
}
},
{
path: "bussinessTypeChange",
name: "单据流转设置",
component: bussinessTypeChange,
meta: {
authRule: ["admin/bussinessTypeChange"]
}
},
]
},
@ -614,7 +630,7 @@ export const asyncRouterMap = [
children: [
{
path: "supplierAdd",
name: "供应商资质新增",
name: "配送企业资质新增",
component: supCompany,
meta: {
authRule: ["firstCamp/certAdd/supplierAdd"]
@ -623,6 +639,7 @@ export const asyncRouterMap = [
{
path: "manufacturerAdd",
name: "生产企业资质新增",
hidden: true,
component: supManufacturer,
meta: {
authRule: ["firstCamp/certAdd/manufacturerAdd"]
@ -631,8 +648,8 @@ export const asyncRouterMap = [
{
path: "productAdd",
name: "产品资质新增",
component: supProduct,
name: "配送产品资质新增",
component: supCertificationAdd,
meta: {
authRule: ["firstCamp/certAdd/productAdd"]
}
@ -666,6 +683,7 @@ export const asyncRouterMap = [
path: "/supplierManage",
redirect: "/supplierManage/supplierAdd",
name: "供应商资质管理",
hidden: true,
component: Empty,
meta: {
authRule: ["firstCamp/supplierManage"]
@ -704,6 +722,7 @@ export const asyncRouterMap = [
path: "/manufacturerManage",
redirect: "/manufacturerManage/manufacturerAdd",
name: "生产企业资质管理",
hidden: true,
component: Empty,
meta: {
authRule: ["firstCamp/manufacturerManage"]
@ -742,6 +761,7 @@ export const asyncRouterMap = [
redirect: "/productManage/productAdd",
name: "产品资质管理",
component: Empty,
hidden: true,
meta: {
authRule: ["firstCamp/productManage"]
},
@ -1044,8 +1064,16 @@ export const asyncRouterMap = [
}
},
{
path: "applySearch",
path: "applyAudit",
component: pureApplyAudit,
name: "申购单据审核",
meta: {
authRule: ["purchase/apply/audit"]
}
},
{
path: "applySearch",
component: pureApplySearch,
name: "申购单据查询",
meta: {
authRule: ["purchase/apply/search"]
@ -1072,9 +1100,17 @@ export const asyncRouterMap = [
authRule: ["purchase/plan/planAdd"]
}
},
{
path: "planAudit",
component: purPlanAudit,
name: "采购计划审核",
meta: {
authRule: ["purchase/plan/planAudit"]
}
},
{
path: "planSearch",
component: purPlan,
component: purPlanSearch,
name: "采购计划查询",
meta: {
authRule: ["purchase/plan/planSearch"]

@ -0,0 +1,289 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.name"
placeholder="业务类型"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick"
>新增
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column label="单据类型名称" prop="originName"></el-table-column>
<el-table-column label="单据类型代码" prop="originAction"></el-table-column>
<el-table-column label="目标单据类型" prop="targetBusName"></el-table-column>
<el-table-column label="类型" prop="type">
<template slot-scope="scope">
<span>{{ typeMap[scope.row.type] }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="enable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.enable] }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="handleDeleteClick(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
:title="formMap[formName]"
:visible.sync="addDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {
getBusChange,
updateBusChange, delBusChange,
insertBusChange
} from "../../api/basic/busTypeChange";
import modifyDialog from "./BusTypeChangeModify";
import axios from "axios";
export default {
data() {
return {
filterQuery: {
name: "",
page: 1,
limit: 20,
},
addDialogVisible: false,
list: [],
inputQuery: {},
enableMap: {
true: "禁用",
false: "启用",
},
typeMap: {
1: "耗材领用",
2: "产品申购",
3: "采购计划",
},
total: 0,
loading: false,
configParms: {},
formMap: {
add: "新增单据流转设置",
update: "编辑单据流转设置",
},
formName: "add",
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: null,
enable: null,
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.addDialogVisible = false;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getBusChange(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() {
if (this.$isBlank(this.inputQuery.originName)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.originAction)) {
this.$message.error("单据类型代码不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.targetBusAction)) {
this.$message.error("目标单据类型不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.type)) {
this.$message.error("请选择设置类型!");
return;
}
if (this.$isBlank(this.inputQuery.enable)) {
this.$message.error("请选择启用状态!");
return;
}
if (this.formName == "add") {
let numRegExp = '^[0-9]*$';
let numReg = new RegExp(numRegExp);
if (numReg.test(this.inputQuery.name)) {
this.$message.error("单据类型名称不得为纯数字类型!");
return;
}
insertBusChange(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
} else {
updateBusChange(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
}
},
handleAddClick() {
this.inputQuery = {};
this.formName = "add";
this.addDialogVisible = true;
},
handleModifyClick(row) {
this.inputQuery = row;
this.formName = "update";
this.addDialogVisible = true;
},
handleDeleteClick(row) {
this.deleteDialog(row.id)
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单据类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
id: rowId,
}
delBusChange(query)
.then((response) => {
this.getList();
})
.catch(() => {
});
})
.catch(() => {
});
},
thirdSysChange() {
this.getList();
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.getList();
},
};
</script>

@ -0,0 +1,220 @@
<template>
<div>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>单据类型名称:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
:disabled="!isAdd"
v-model.trim="inputQuery.originName"
></el-input>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>单据类型代码:&nbsp;</span>
</div>
<el-input
style="width: 200px"
:disabled="!isAdd"
size="small"
splaceholder="请输入内容"
v-model.trim="inputQuery.originAction"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>目标单据类型:&nbsp;</span>
</div>
<el-select v-model="inputQuery.targetBusAction" placeholder="请选择" clearable="true">
<el-option
v-for="item in busTypes"
:key="item.localAction"
:label="item.localName"
:value="item.localAction">
<span style="float: left">{{ item.localName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.localAction }}</span>
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>设置类型:&nbsp;</span>
</div>
<el-select
size="small"
v-model="inputQuery.type"
placeholder="设置类型"
>
<el-option label="耗材领用" :value="1"></el-option>
<el-option label="产品申购" :value="2"></el-option>
<el-option label="采购计划" :value="3"></el-option>
</el-select>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>启用状态:&nbsp;</span>
</div>
<el-select
size="small"
v-model="inputQuery.enable"
placeholder="启用状态"
>
<el-option label="启用" :value="false"></el-option>
<el-option label="禁用" :value="true"></el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>备注:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.remark"
></el-input>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
</div>
</template>
<script>
import {
getBasicThirdSys,
} from "../../api/basic/basicThirdSys";
import {
getLocalBusType, getLocalJoinBusType,
} from "../../api/basic/busLocalType";
export default {
name: "BusTypeChangeModify",
props: {
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
enabled: true,
isBuType: true,
},
busTypes: [],
isAdd: false,
rules: {
originName: [
{
required: true,
message: "单据类型名称不能为空",
trigger: "blur"
}
],
originAction: [
{
required: true,
message: "单据类型代码不能为空",
trigger: "blur"
}
],
targetBusAction: [
{
required: true,
message: "目标单据类型不能为空",
trigger: "blur"
}
],
type: [
{
required: true,
message: "请选择设置类型",
trigger: "blur"
}
],
enable: [
{
required: true,
message: "请选择启用状态",
trigger: "blur"
}
],
},
}
},
methods: {
getBusType() {
let query = {
enabled: true,
corpType: 1,
};
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
}
},
created() {
if (this.inputQuery.originAction == null) {
this.isAdd = true;
}
this.getBusType();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 20px;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -1,8 +1,7 @@
<template>
<div>
<el-card class="el-card">
<el-card class="el-card" style="margin-top: -15px">
<div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini">
<el-row>
<el-form-item class="query-form-item">
@ -99,6 +98,19 @@
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></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="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
v-if="storageVisible"
title="请选择单据所属仓库信息"
@ -148,8 +160,11 @@ export default {
originType: null,
page: 1,
limit: 10,
allocateStatus: 0,
type: 0,
customerId: null,
},
detailList: [],
combineQuery: {
thirdId: "",
relId: "",
@ -214,6 +229,7 @@ export default {
billAction: null,
page: 1,
limit: 10,
allocateStatus: 0,
};
this.actDateRange = [];
this.getList();
@ -233,6 +249,7 @@ export default {
handleChange(val) {
console.log(val);
this.currentRow = val;
this.detailList = val.subErpOrders;
},
handleErpPageChange(val) {
this.listQuery.page = val;

File diff suppressed because it is too large Load Diff

@ -501,7 +501,7 @@ import {BASE_URL} from "../../config/app";
import stockOrderDistribution from "./stockOrderDistribution";
import stockOrderEditDistribution from "./stockOrderEditDistribution";
import stockQRCodeExport from "./stockQRCodeExport";
import selectThrOrder from "./selectThrOrder";
import selectThrOrder from "./selectThrOrderDialog";
import draggable from "vuedraggable";
import codeDetail from "./errorCode";
import addOrder from "./addOrder";

@ -39,7 +39,7 @@
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="combine"></el-button>
<el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group>
</el-form-item>
</el-row>
@ -54,9 +54,14 @@
@current-change="handleChange"
ref="multipleTable"
>
<el-table-column
type="selection"
width="55">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<el-table-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
@ -91,8 +96,8 @@
show-overflow-tooltip
></el-table-column>
<el-table-column
label="供应商"
prop="companyName"
label="器械类别"
prop="qxlb"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right" width="160">
@ -127,6 +132,21 @@
>
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
</el-dialog>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form">
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -139,7 +159,7 @@ import store from "../../store";
import udiRlDetailDialog from "./../basic/UdiRlDetailDialog";
export default {
name: "closeDialog",
name: "stockOrderNewSelectProduct",
props: {
data: {
type: Object,
@ -168,12 +188,13 @@ export default {
erpName: "",
keys: [],
},
radioCheck: null,
dataList: [],
pageTotal: 0,
pageTotal: 1,
total: 1,
currentRow: null,
loading: false,
udiRlDetailVisible: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
busTypes: [],
@ -211,6 +232,10 @@ export default {
},
orderEditor: false,
orderId: "",
currentCert: null,
certList: [],
dialogFormVisible: false,
multipleSelection: null,
};
},
methods: {
@ -227,7 +252,7 @@ export default {
nameCode: "",
ggxh: null,
page: 1,
limit: 10,
limit: 20,
addType: 1,
billType: this.data.formData.billType,
corpId: this.data.formData.corpId,
@ -246,7 +271,9 @@ export default {
this.getList();
},
handleChange(val) {
this.radioCheck = val.id;
this.currentRow = val;
this.multipleSelection = val
},
handleDetailClick(row) {
this.currentRow = row;
@ -313,41 +340,63 @@ export default {
intentBack() {
this.closeDialog();
},
combine() {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
confirmSelect() {
if (this.multipleSelection == null) {
this.$message.error('未选择产品');
return;
}
let ids = [];
let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
},
selection.forEach((obj, index) => {
let data = {
relId: obj.rlId,
}
ids.push(data);
});
combine() {
let ids = [];
let data = {
relId: this.multipleSelection.rlId,
}
ids.push(data);
this.loading = true;
let tQuery = {
datas: ids,
stockOrderLists: this.data.stockOrderLists,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
};
getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
selectCert() {
if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!");
}
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
},
},
components: {udiRlDetailDialog},
created() {
if (this.$isNotBlank(this.data)) {
this.listQuery.nameCode = this.data.udi;
@ -355,13 +404,15 @@ export default {
this.listQuery.billType = this.data.billType;
} else
this.listQuery.billType = this.data.formData.billType;
this.listQuery.corpId = this.data.formData.corpId;
if (this.data.formData != null) {
this.listQuery.corpId = this.data.formData.corpId;
}
this.orderEditor = this.data.orderEditor;
this.orderId = this.data.orderId;
this.getList();
}
this.getList();
},
components: {udiRlDetailDialog},
};
</script>

@ -0,0 +1,393 @@
<template>
<div>
<el-card class="el-card" style="margin-top: -15px">
<div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="listQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="listQuery.corpName"
placeholder="往来单位"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="listQuery.billAction" placeholder="请选择领用类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.originAction"
:label="item.originName"
:value="item.originAction">
<span style="float: left;font-size: 13px">{{ item.originAction }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.originName
}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>单据日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item style="display: flex">
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="submitFind"></el-button>
<el-button type="primary" icon="search" @click="combine"
>确定
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
<el-row>
</el-row>
</el-form>
<el-table
:data="dataList"
style="width: 100%"
highlight-current-row="true"
v-loading="loading"
:row-class-name="tableRowClassName"
@current-change="handleChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位" prop="corpName" width="300"
show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据类型" prop="billType"></el-table-column>
<el-table-column label="单据状态" prop="billFlag" width="80"></el-table-column>
<el-table-column label="单据日期" prop="billdate"></el-table-column>
</el-table>
<el-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></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="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
v-if="storageVisible"
title="请选择单据所属仓库信息"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
:visible.sync="storageVisible">
<selectInvDialog
:closeInvDialog="closeInvDialog"
:billData="currentRow"
:closeSubmitDialog="closeSubmitDialog"
></selectInvDialog>
</el-dialog>
</div>
</template>
<script>
import {addReceiveOrder, addStockOrder, getCloudErp} from "../../api/inout/erpOrder";
import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import store from "../../store";
import {getOriginBusType} from "@/api/basic/busOriginType";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import selectInvDialog from "./DialogSelectInv";
import {getReceiveOrder} from "@/api/inout/receiveOrder";
import {getBusChange} from "@/api/basic/busTypeChange";
export default {
name: "closeDialog",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
listQuery: {
billNo: "",
thirdSysFk: "",
billAction: null,
originType: null,
page: 1,
limit: 10,
type: 1,
editStatus: 2,
allocateStatus: 0,
customerId: null,
},
detailList: [],
storageVisible: false,
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
curLocInv: null,
loading: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
originTypes: [],
storageList: [],
actDateRange: [],
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: {
onReset() {
this.$router.push({
path: "",
});
this.listQuery = {
billNo: "",
corpName: null,
billAction: null,
type: 1,
editStatus: 2,
page: 1,
allocateStatus: 0,
limit: 10,
};
this.actDateRange = [];
this.getList();
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
checkSelectable(row) {
return !row.check;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleChange(val) {
this.currentRow = val;
this.detailList = val.subErpOrders;
},
handleErpPageChange(val) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.getList();
event.target.select();
},
getList() {
this.loading = true;
if (this.actDateRange !== null) {
this.listQuery.startDate = this.actDateRange[0];
this.listQuery.endDate = this.actDateRange[1];
} else {
this.listQuery.startDate = null;
this.listQuery.endDate = null;
}
this.listQuery.customerId = store.getters.customerId;
getReceiveOrder(this.listQuery)
.then((response) => {
console.log(response)
this.loading = false;
if (response.code === 20000) {
this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
combine() {
if (this.$isBlank(this.currentRow.id)) {
return;
}
this.curLocInv = this.currentRow.locStorageCode;
if (this.$isBlank(this.curLocInv)) {
this.storageVisible = true;
} else {
let tQuery = {
id: this.currentRow.id,
locStorageCode: this.curLocInv,
invWarehouseCode: this.currentRow.invWarehouseCode,
}
addReceiveOrder(tQuery)
.then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
},
submitFind() {
this.listQuery.page = 1;
this.getList();
},
selectStorage(row) {
this.curLocInv = row.code;
let tQuery = {
id: this.currentRow.id,
locStorageCode: this.curLocInv,
}
addStockOrder(tQuery)
.then((response) => {
if (response.code === 20000) {
this.storageVisible = false;
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleSelectionUdiChange(val) {
console.log("----" + val);
this.multipleUdiSelection = val;
},
getBusType() {
let query = {
enabled: false,
};
getBusChange(query)
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
},
getStorage(event) {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList.length == 1) {
this.curLocInv = this.storageList[0].code;
}
})
.catch(() => {
});
},
closeInvDialog() {
this.storageVisible = false;
},
closeSubmitDialog() {
this.storageVisible = false;
this.combine();
},
},
created() {
this.getBusType();
this.getStorage();
this.getList();
},
components: {selectInvDialog}
};
</script>
<style scoped>
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>

@ -96,7 +96,11 @@ export default {
type: Function,
required: true,
},
invQueryData:{
invQueryData: {
type: Object,
required: true,
},
type: {
type: Object,
required: true,
}
@ -290,6 +294,7 @@ export default {
let tQuery = {
datas: ids,
stockOrderLists: this.data.stockOrderLists,
type: this.type,
};
getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false;

@ -184,11 +184,11 @@ export default {
getCodeList() {
this.loading = true;
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId;
this.query.invStorageCode = this.idQuery.invStorageCode;
filterDetailProducts(this.query) //
this.query.orderIdFk = this.idQuery.orderIdFk;
let query = {
orderIdFk: this.idQuery.orderIdFk
}
filterDetailProducts(query) //
.then((response) => {
this.loading = false;
this.codeArry = response.data.list || [];

@ -86,14 +86,19 @@
</template>
</el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
width="180"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="分库" prop="invSubStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="所属单号" prop="orderIdFk" v-if="showSup"
show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -179,7 +184,7 @@ export default {
dialogVisible: false,
deleteLoading: false,
busTypes: [],
idQuery: null,
idQuery: {},
showSup: false,
};
},
@ -328,7 +333,6 @@ export default {
intentDetail(row) {
this.idQuery = row;
// this.idQuery.supId = null;
this.idQuery.customerId = null;
this.codeDetailVisible = true;
},

@ -3,7 +3,7 @@
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px;margin-top: -10px">
<el-button
type="primary"
@click.native="saveOrder('1')"
@ -320,6 +320,7 @@ export default {
},
selectProductFunction() {
this.selectProductVisible = true;
this.thisData.stockOrderLists = this.codeArray;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
@ -333,6 +334,7 @@ export default {
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
}
},
rowChange(val) {
this.currentRow = val;

@ -114,8 +114,8 @@
</div>
</template>
<script>
import purPlanEdit from "./purPlanEdit";
import {delApply, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purPlan";
import purPlanEdit from "./purPlanEditDialog";
import {delApply, inserThrOrderWeb, listPlan, listApplyDetail} from "@/api/purchase/purPlan";
export default {
data() {
@ -223,7 +223,7 @@ export default {
this.filterQuery.endDate = null;
}
this.loading = true;
listApply(this.filterQuery)
listPlan(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
@ -255,24 +255,33 @@ export default {
});
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
this.getList();
} else {
this.$message.error(response.message);
this.$confirm("是否确定提交审核?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
inserThrOrderWeb(tQuery)
.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(() => {
this.loading = false;
})
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {

@ -0,0 +1,363 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery"
class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="onSubmitFind"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<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="billDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.billDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="采购员" prop="createByName"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column>
<el-table-column label="采购分库" prop="subInvName"></el-table-column>
<el-table-column label="采购说明" prop="remark"></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="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled=" scope.row.status==3"
@click.native="newDistributionForm(scope.$index, scope.row)"
>审核
</el-button
>
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></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="manufactory" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<purPlanEdit
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></purPlanEdit>
</el-dialog>
</div>
</template>
<script>
import purPlanEdit from "./purPlanDetailDialog";
import {delApply, auditListPlan, listApplyDetail} from "@/api/purchase/purPlan";
export default {
data() {
return {
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
},
formName: null,
formMap: {
add: "新增采购计划",
update: "采购计划审核",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
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: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
};
this.actDateRange = [];
this.getList();
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
auditListPlan(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
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.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
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;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
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;
},
}
,
components: {
purPlanEdit,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
2: "warning",
3: "success",
4: "danger",
};
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.getList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,504 @@
<template>
<div>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-row type="flex" justify="end" v-if="editType == 1">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
type="primary"
@click.native="saveOrder('3')"
:loading="loading"
>审核通过
</el-button
>
<el-button
type="primary"
@click.native="saveOrder('4')"
:loading="loading"
>拒绝申请
</el-button
>
</el-button-group>
</el-row>
<el-card style="margin-top: -5px;">
<el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="3">
<div class="ao-text">
<span>单据号</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.billNo" auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>单据日期</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billdate">
<el-date-picker
v-model="formData.billDate"
type="datetime"
placeholder="选择日期" :disabled="true"
style="width: 100%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>采购仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="采购仓库信息" @change="locInChange"
style="width: 50%" :disabled="true"
clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="formData.invWarehouseCode" placeholder="采购分库信息" style="width: 50%"
:disabled="true" clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>采购说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.remark" :disabled="true" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>审核说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.auditRemark" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card>
<el-button-group style="display: flex">
<el-button
type="primary"
size="small"
@click.native.stop="selectProductFunction()"
style="margin: 0px 60px 10px auto; height: 35px"
:loading="loading"
>产品录入
</el-button
>
</el-button-group>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;"
:row-class-name="tableRowClassName"
max-height="300" height="300" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column
label="产品通用名"
prop="productName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="计量单位"
prop="measname"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产厂家"
prop="manufactory"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150" label="单据数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%"
type='number'
@change="tableCountChange(scope.row)"
:disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.index === selectedIndex"
@click.stop="true"
@click.native="rowChange(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
</div>
</template>
<script>
import draggable from "vuedraggable";
import stockOrderNewSelectProduct from "../business/stockOrderNewSelectProduct";
import {inserThrOrderWeb, delApplyDetail, listApplyDetail} from "@/api/purchase/purPlan";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default {
name: "idQuery",
props: {
closeDialog: {
type: Function,
required: true,
},
idQuery: {
type: Object,
required: true,
},
editType: {
type: Object,
required: true,
},
},
data() {
return {
code: "",
query: {
orderIdFk: "",
page: 1,
limit: 10,
},
formData: {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
auditRemark: null,
},
formRules: {},
codeArray: [],
total: 0,
loading: false,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
},
typeMap: {
1: "预入库",
2: "普通采购",
},
orderEditor: true,
sOptions: [],
sValue: [],
sList: [],
sLoading: false,
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
thisData: {},
storageList: [],
subInvList: [],
invQueryData: {},
};
},
components: {
draggable,
stockOrderNewSelectProduct,
},
methods: {
saveOrder(status) {
let tip = "";
if (status == "3") {
tip = "是否确定通过该采购计划?";
} else {
tip = "是否确定拒绝该采购计划?";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
},
submitFunction(status) {
let tMessage = status === '1' ? '保存' : '提交';
this.loading = true;
let tQuery = {
editStatus: status,
purPlanEntity: this.formData,
subErpOrders: this.codeArray,
}
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
selectProductFunction() {
this.selectProductVisible = true;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.thisData = {};
if (this.$isNotBlank(rData)) {
this.codeArray = [];
rData.forEach((obj, index) => {
this.codeArray.unshift(obj);
});
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
}
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
// row.count = row.reCount;
}
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
}
},
deleteCodeArray(index, row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
this.selectedIndex = "";
if (this.orderEditor) {
this.detailLoading = true;
if (this.$isNotBlank(row.id)) {
delApplyDetail(row.id)
.then(response => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success(response.data);
// this.getStockOrderDetailList();
this.codeArray.splice(index, 1);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
}).catch(() => {
});
},
getStockOrderDetailList() {
this.loading = true;
listApplyDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.formData.locStorageCode = this.storageList[0].code;
}
this.findSubInvs();
})
.catch(() => {
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.findSubInvs();
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData;
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
} else {
this.formData = {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
};
this.orderEditor = false;
}
this.getStorage();
this.codeArray = [];
},
};
</script>
<style>
.ao-text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
}
</style>

@ -320,6 +320,7 @@ export default {
})
},
selectProductFunction() {
this.thisData.stockOrderLists = this.codeArray;
this.selectProductVisible = true;
},
closeDialogC2(rData) {

@ -0,0 +1,363 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery"
class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="onSubmitFind"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<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="billDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.billDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="采购员" prop="createByName"></el-table-column>
<el-table-column label="采购仓库" prop="invName"></el-table-column>
<el-table-column label="采购分库" prop="subInvName"></el-table-column>
<el-table-column label="采购说明" prop="remark"></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="操作" fixed="right">
<template slot-scope="scope">
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native="newDistributionForm(scope.$index, scope.row)"-->
<!-- >审核-->
<!-- </el-button-->
<!-- >-->
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></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="manufactory" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<purPlanEdit
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></purPlanEdit>
</el-dialog>
</div>
</template>
<script>
import purPlanEdit from "./purPlanDetailDialog";
import {delApply, listPlan, listApplyDetail} from "@/api/purchase/purPlan";
export default {
data() {
return {
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
},
formName: null,
formMap: {
add: "新增采购计划",
update: "采购计划审核",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
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: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
};
this.actDateRange = [];
this.getList();
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
this.filterQuery.status = 3;
listPlan(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
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.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
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;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
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;
},
}
,
components: {
purPlanEdit,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
2: "warning",
3: "success",
4: "danger",
};
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.getList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -74,9 +74,9 @@
>审核
</el-button
>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
@ -112,6 +112,7 @@
<pureApplyDetail
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></pureApplyDetail>
</el-dialog>
</div>
@ -138,7 +139,7 @@ export default {
formName: null,
formMap: {
add: "新增申购单据",
update: "编辑申购单据",
update: "审核申购单据",
},
statusMap: {
1: "草稿",
@ -147,6 +148,7 @@ export default {
4: "已拒绝"
},
idQuery: {},
editType: 1,
total: 0,
thirdSys: [],
thirdSysDetail: null,
@ -335,8 +337,9 @@ export default {
filters: {
statusFilterType(status) {
const statusMap = {
1: "warning",
2: "success",
2: "warning",
3: "success",
4: "danger",
};
return statusMap[status];
}

@ -1,191 +1,191 @@
<template>
<div>
<div>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
type="primary"
@click.native="saveOrder('3')"
:loading="loading"
>审核通过
</el-button
>
<el-button
type="primary"
@click.native="saveOrder('4')"
:loading="loading"
>拒绝申请
</el-button
>
</el-button-group>
</el-row>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-row type="flex" justify="end" v-if="editType == 1">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
type="primary"
@click.native="saveOrder('3')"
:loading="loading"
>审核通过
</el-button
>
<el-button
type="primary"
@click.native="saveOrder('4')"
:loading="loading"
>拒绝申请
</el-button
>
</el-button-group>
</el-row>
<el-card style="margin-top: -5px;">
<el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="3">
<div class="ao-text">
<span>单据号</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.billNo" auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>单据日期</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billdate">
<el-date-picker
v-model="formData.billDate"
type="datetime"
placeholder="选择日期"
style="width: 100%" :disabled="true"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-card style="margin-top: -5px;">
<el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="3">
<div class="ao-text">
<span>单据号</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.billNo" auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>单据日期</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billdate">
<el-date-picker
v-model="formData.billDate"
type="datetime"
placeholder="选择日期"
style="width: 100%" :disabled="true"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>申购科室</span>
</div>
</el-col>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>申购科室</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
:disabled="true"
style="width: 50%"
clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" style="width: 50%"
:disabled="true"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>申购说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.remark" auto-complete="off" type="textarea" :disabled="true"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>审核说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.remark" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
:disabled="true"
style="width: 50%"
clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" style="width: 50%"
:disabled="true"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>申购说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.remark" auto-complete="off" type="textarea" :disabled="true"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>审核说明</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billNo">
<el-input v-model="formData.auditRemark" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-card>
<el-card>
<el-card>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;"
:row-class-name="tableRowClassName"
max-height="300" height="300" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column
label="产品通用名"
prop="productName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;"
:row-class-name="tableRowClassName"
max-height="300" height="300" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column
label="产品通用名"
prop="productName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="计量单位"
prop="measname"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产厂家"
prop="manufactory"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150" label="单据数量" prop="count">
</el-table-column>
<el-table-column
label="计量单位"
prop="measname"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产厂家"
prop="manufactory"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150" label="单据数量" prop="count">
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.index === selectedIndex"
@click.stop="true"
@click.native="rowChange(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.index === selectedIndex"
@click.stop="true"
@click.native="rowChange(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
</div>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
</div>
</template>
<script>
@ -196,281 +196,286 @@ import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default {
name: "idQuery",
props: {
closeDialog: {
type: Function,
required: true,
},
idQuery: {
type: Object,
required: true,
},
name: "idQuery",
props: {
closeDialog: {
type: Function,
required: true,
},
data() {
return {
code: "",
query: {
orderIdFk: "",
page: 1,
limit: 10,
},
formData: {
status: null,
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
},
formRules: {},
codeArray: [],
total: 0,
loading: false,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
},
typeMap: {
1: "预入库",
2: "普通采购",
},
orderEditor: true,
sOptions: [],
sValue: [],
sList: [],
sLoading: false,
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
thisData: {},
storageList: [],
subInvList: [],
invQueryData: {},
};
idQuery: {
type: Object,
required: true,
},
components: {
draggable,
stockOrderNewSelectProduct,
editType: {
type: Object,
required: true,
},
methods: {
saveOrder(status) {
let tip = "";
if (status == "3") {
tip = "是否确定通过该申购请求?";
},
data() {
return {
code: "",
query: {
orderIdFk: "",
page: 1,
limit: 10,
},
formData: {
status: null,
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
},
formRules: {},
codeArray: [],
total: 0,
loading: false,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
},
typeMap: {
1: "预入库",
2: "普通采购",
},
orderEditor: true,
sOptions: [],
sValue: [],
sList: [],
sLoading: false,
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
thisData: {},
storageList: [],
subInvList: [],
invQueryData: {},
};
},
components: {
draggable,
stockOrderNewSelectProduct,
},
methods: {
saveOrder(status) {
let tip = "";
if (status == "3") {
tip = "是否确定通过该申购请求?";
} else {
tip = "是否确定拒绝该申购请求?";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
},
submitFunction(status) {
this.loading = true;
this.formData.status = status;
auditOrder(this.formData)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("更新成功!");
this.closeDialog(true);
} else {
tip = "是否确定拒绝该申购请求?";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
},
submitFunction(status) {
this.loading = true;
this.formData.status = status;
auditOrder(this.formData)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("更新成功!");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
selectProductFunction() {
this.selectProductVisible = true;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.thisData = {};
if (this.$isNotBlank(rData)) {
this.codeArray = [];
rData.forEach((obj, index) => {
this.codeArray.unshift(obj);
});
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
}
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
// row.count = row.reCount;
this.$message.error(response.message);
}
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
})
.catch(() => {
this.loading = false;
})
},
selectProductFunction() {
this.selectProductVisible = true;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.thisData = {};
if (this.$isNotBlank(rData)) {
this.codeArray = [];
rData.forEach((obj, index) => {
this.codeArray.unshift(obj);
});
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
}
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
// row.count = row.reCount;
}
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
}
},
deleteCodeArray(index, row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
this.selectedIndex = "";
this.$refs["dataForm"].resetFields();
this.getList();
}
},
deleteCodeArray(index, row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
this.selectedIndex = "";
if (this.orderEditor) {
this.detailLoading = true;
if (this.$isNotBlank(row.id)) {
delApplyDetail(row.id)
.then(response => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success(response.data);
// this.getStockOrderDetailList();
this.codeArray.splice(index, 1);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else {
this.$message.success('删除成功');
if (this.orderEditor) {
this.detailLoading = true;
if (this.$isNotBlank(row.id)) {
delApplyDetail(row.id)
.then(response => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success(response.data);
// this.getStockOrderDetailList();
this.codeArray.splice(index, 1);
}
}).catch(() => {
});
},
getStockOrderDetailList() {
this.loading = true;
listApplyDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
}).catch(() => {
});
},
getStockOrderDetailList() {
this.loading = true;
listApplyDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.formData.locStorageCode = this.storageList[0].code;
}
this.findSubInvs();
})
.catch(() => {
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.formData.locStorageCode = this.storageList[0].code;
}
this.formData.locStorageCode = item;
this.findSubInvs();
},
})
.catch(() => {
});
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
created() {
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData;
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
} else {
this.formData = {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
};
this.orderEditor = false;
}
this.getStorage();
this.codeArray = [];
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.findSubInvs();
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData;
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
} else {
this.formData = {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
};
this.orderEditor = false;
}
this.getStorage();
this.codeArray = [];
},
};
</script>
<style>
.ao-text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
}
</style>

@ -0,0 +1,392 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery"
class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.status" placeholder="审核状态">
<el-option label="全部" value=""></el-option>
<el-option label="未审核" value="2"></el-option>
<el-option label="已审核" value="3"></el-option>
<el-option label="已拒绝" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="onSubmitFind"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<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="billDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.billDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="createByName"></el-table-column>
<el-table-column label="申购仓库" prop="invName"></el-table-column>
<el-table-column label="申购分库" prop="subInvName"></el-table-column>
<el-table-column label="申购说明" prop="remark"></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="操作" fixed="right">
<template slot-scope="scope">
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native="newDistributionForm(scope.$index, scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></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="manufactory" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<pureApplyDetail
:closeDialog="closeDialog"
:idQuery="idQuery"
:editType="editType"
></pureApplyDetail>
</el-dialog>
</div>
</template>
<script>
import pureApplyDetail from "./pureApplyDetailDialog";
import {delApply, auditOrder, listApplyDetail, auditListApply} from "@/api/purchase/purApply";
export default {
data() {
return {
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
},
formName: null,
formMap: {
add: "新增申购单据",
update: "申购单据详情",
},
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
idQuery: {},
editType: 2,
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
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: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
};
this.actDateRange = [];
this.getList();
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
this.filterQuery.status = 3;
auditListApply(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
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.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
submitOrder(row) {
this.loading = true;
let tQuery = {
editStatus: 2,
purApplyEntity: row,
}
auditOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功!");
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;
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
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;
},
}
,
components: {
pureApplyDetail,
}
,
filters: {
statusFilterType(status) {
const statusMap = {
2: "warning",
3: "success",
4: "danger",
};
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.getList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -20,7 +20,9 @@
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="formData.name" auto-complete="off"></el-input>
<el-input v-model="formData.name" auto-complete="off"
:disabled="formData.auditStatus == 1"
></el-input>
</el-form-item>
</el-col>
@ -31,7 +33,8 @@
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="formData.code" auto-complete="off"></el-input>
<el-input v-model="formData.code" auto-complete="off"
:disabled="formData.auditStatus == 1"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -48,6 +51,7 @@
<el-date-picker
v-model="formData.vailDate"
type="date"
:disabled="formData.auditStatus == 1"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择有效期">
@ -66,6 +70,7 @@
<el-date-picker
v-model="formData.expireDate"
type="date"
:disabled="formData.auditStatus == 1"
value-format="yyyy-MM-dd"
style="width: 100%"
placeholder="请选择失效期">
@ -74,9 +79,22 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<span>状态</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="need">
<el-select v-model="formData.status" style="width: 100%">
<el-option label="禁用" :value=1></el-option>
<el-option label="启用" :value=0></el-option>
</el-select>
</el-form-item>
</el-col>
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<span>备注</span>
@ -88,6 +106,19 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="4">-->
<!-- </el-col>-->
<!-- <el-col :span="16">-->
<!-- <div style="color: red">-->
<!-- 需要上传档案为营业执照电子档案经营许可证电子档案经营备案证电子档案开户行电子档案-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<span>文件</span>
@ -96,6 +127,7 @@
<el-col :span="8">
<el-form-item>
<el-upload
:disabled="formData.auditStatus == 1"
class="upload-demo"
ref="upload"
:action="this.uploadUrl"
@ -111,7 +143,9 @@
:file-list="fileList"
:data="{type:'image2'}"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">{{ choiceFile }}</el-button>
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }}
</el-button>
<div>只能上传 .jpg,.png 文件且不超过 2 MB</div>
</el-upload>
<!-- <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"-->
@ -123,19 +157,6 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="4">-->
<!-- </el-col>-->
<!-- <el-col :span="16">-->
<!-- <div style="color: red">-->
<!-- 需要上传档案为营业执照电子档案经营许可证电子档案经营备案证电子档案开户行电子档案-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="20">
</el-row>
</el-card>
</el-form>
</div>
@ -147,6 +168,7 @@ import store from "../../store";
import {BASE_URL} from "../../config/app";
import {insertCompanyCert, updateCompanyCert} from "../../api/purchase/companyCert";
import ThrInvWarehouse from "@/views/thrsys/ThrInvWarehouse";
import {removeRl} from "@/api/basic/udiRelevance";
export default {
name: "supCompanyCertAdd",
@ -203,26 +225,46 @@ export default {
this.$refs["dataForm"].validate(valid => {
if (valid) {
if (this.$isNotBlank(this.formData.filePath)) {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.onSubmit();
}
if (this.formData.auditStatus == 1) {
this.$confirm("该证书已审核通过,是否重新提交审核?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.onConfirmSubmit(1);
})
.catch(() => {
});
} else {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.$message.warning(`请选择文件`);
}
this.onConfirmSubmit();
}
}
});
},
onConfirmSubmit(val) {
this.formData.repeatUpload = val;
if (this.$isNotBlank(this.formData.filePath)) {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.onSubmit();
}
} else {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.$message.warning(`请选择文件`);
}
}
},
onSubmit() {
this.loading = true;
this.formData.customerId = this.inputQuery.customerId;
@ -234,8 +276,8 @@ export default {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId;
}
this.formData.auditStatus = "6";
if (this.formData.auditStatus != 1)
this.formData.auditStatus = "6";
if (this.editTye == 1) {
insertCompanyCert(this.formData).then(response => {

@ -349,7 +349,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
supCompanyVisible: false,

@ -349,7 +349,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
supCompanyVisible: false,

@ -57,8 +57,6 @@
<el-form :model="currentSup" :rules="formRules" ref="dataForm">
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>证书名称</span>
@ -77,7 +75,7 @@
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-form-item prop="need">
<el-select v-model="currentSup.need">
<el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option>
@ -132,17 +130,17 @@
<el-table v-loading="loading" :data="manufacturerList" style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" s>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="foreign">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span>
</template>
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="状态" prop="require">
<template slot-scope="scope">
<span>{{ statusMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope">
<el-button
@ -177,10 +175,8 @@
v-if="addManufacturerDialogVisible"
>
<el-form :model="currentManufacturer" :rules="formRules" ref="dataForm">
<el-form :model="currentManufacturer" :rules="formManufactureRules" ref="dataManufacturerForm">
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>证书名称</span>
@ -188,38 +184,38 @@
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="currentManufacturer.name" auto-complete="off"></el-input>
<el-input v-model="currentManufacturer.name" auto-complete="off"
:disabled="currentManufacturer.need"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>是否必传</span>
<span>产地</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-select v-model="currentManufacturer.need" style="width: 100%">
<el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option>
<el-form-item prop="foreign">
<el-select v-model="currentManufacturer.foreign" style="width: 100%"
:disabled="currentManufacturer.need">
<el-option label="全部" :value="1"></el-option>
<el-option label="国外" :value="2"></el-option>
<el-option label="国内" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>产地</span>
<span>是否禁用</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-select v-model="currentManufacturer.foreign" style="width: 100%">
<el-option label="全部" value="1"></el-option>
<el-option label="国外" value="2"></el-option>
<el-option label="国内" value="3"></el-option>
<el-form-item prop="need">
<el-select v-model="currentManufacturer.need" style="width: 100%">
<el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option>
</el-select>
</el-form-item>
</el-col>
@ -270,11 +266,6 @@
<el-table v-loading="productLoading" :data="productList" style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="need" s>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="imports">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span>
@ -284,7 +275,16 @@
</el-table-column>
<el-table-column label="产品类别" prop="hchzsb">
</el-table-column>
<el-table-column label="分类编码" prop="flbm">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="状态" prop="need" s>
<template slot-scope="scope">
<span>{{ statusMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope">
<el-button
@ -337,14 +337,14 @@
<el-col :span="3">
<div class="ao-text">
<span>是否必传</span>
<span>是否禁用</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-form-item prop="need">
<el-select v-model="currentProduct.need" style="width: 100%">
<el-option label="" :value=true></el-option>
<el-option label="" :value=false></el-option>
<el-option label="禁用" :value=true></el-option>
<el-option label="启用" :value=false></el-option>
</el-select>
</el-form-item>
</el-col>
@ -414,6 +414,42 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>分类编码</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="require">
<el-select
v-model="currentProduct.flbmList"
filterable
remote
clearable="true"
style="width: 100%"
multiple
reserve-keyword
placeholder="请选择"
:remote-method="classifySearch"
:loading="loading"
>
<el-option
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddProductSubmit"
@ -434,6 +470,7 @@
<script>
import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet";
import {filterClassify} from "@/api/purchase/classifyCode"
export default {
data() {
@ -459,14 +496,27 @@ export default {
update: "编辑配送企业资质设置",
},
/**--------生产企业资质设置 0--------------*/
formRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
],
need: [
{required: true, message: "请选择是否必传", trigger: "blur"}
],
},
/**--------生产企业资质设置 --------------*/
manufacturerList: [],
manufacturerQuery: {
type: 2,
page: 1,
limit: 20
},
statusMap: {
true: "禁用",
false: "启用",
},
foreignMap: {
"1": "全部",
"2": "国外",
@ -483,6 +533,15 @@ export default {
update: "编辑生产企业资质设置",
},
formManufactureRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
],
need: [
{required: true, message: "请选择是否禁用", trigger: "blur"}
],
},
/**--------产品资质设置--------------*/
productList: [],
productQuery: {
@ -500,6 +559,9 @@ export default {
update: "编辑产品资质设置",
},
classifyList: [],
mutilData: [],
inputKey: null,
};
},
@ -524,6 +586,8 @@ export default {
this.total = 0;
});
},
handleEdit(row) {
this.formName = "update";
this.currentSup = row;
@ -547,25 +611,31 @@ export default {
this.addDialogVisible = true;
},
onAddSubmit() {
this.addDialogVisible = false;
if (this.formName == "add") {
this.currentSup.type = 1;
addSupCertSet(this.currentSup)
.then((response) => {
this.getList();
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentSup).then((res) => {
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.addDialogVisible = false;
if (this.formName == "add") {
this.currentSup.type = 1;
addSupCertSet(this.currentSup)
.then((response) => {
this.getList();
})
.catch(() => {
});
} else {
this.$message.error(res.message);
modifySupCertSet(this.currentSup).then((res) => {
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
}
})
}
}
});
},
cancelDialog() {
this.addDialogVisible = false;
@ -612,25 +682,31 @@ export default {
this.addManufacturerDialogVisible = true;
},
onAddManufacturerSubmit() {
this.addManufacturerDialogVisible = false;
if (this.formManufacturerName == "add") {
this.currentManufacturer.type = 2;
addSupCertSet(this.currentManufacturer)
.then((response) => {
this.getManufacturerList();
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentManufacturer).then((res) => {
if (res.code == 20000) {
this.getManufacturerList();
this.$message.success("保存成功!");
this.$refs["dataManufacturerForm"].validate(valid => {
if (valid) {
this.addManufacturerDialogVisible = false;
if (this.formManufacturerName == "add") {
this.currentManufacturer.type = 2;
addSupCertSet(this.currentManufacturer)
.then((response) => {
this.getManufacturerList();
})
.catch(() => {
});
} else {
this.$message.error(res.message);
modifySupCertSet(this.currentManufacturer).then((res) => {
if (res.code == 20000) {
this.getManufacturerList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
}
})
}
}
});
},
@ -654,6 +730,8 @@ export default {
this.currentProduct = row;
this.addProductDialogVisible = true;
this.classifyFirstSearch(this.currentProduct.flbm);
},
handleProductDel(row) {
let query = {
@ -672,28 +750,62 @@ export default {
this.addProductDialogVisible = true;
},
onAddProductSubmit() {
this.addProductDialogVisible = false;
if (this.formProductName == "add") {
this.currentProduct.type = 3;
addSupCertSet(this.currentProduct)
.then((response) => {
this.getProductList();
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentProduct).then((res) => {
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.addProductDialogVisible = false;
if (this.formProductName == "add") {
this.currentProduct.type = 3;
addSupCertSet(this.currentProduct)
.then((response) => {
this.getProductList();
})
.catch(() => {
});
} else {
this.$message.error(res.message);
modifySupCertSet(this.currentProduct).then((res) => {
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
} else {
this.$message.error(res.message);
}
})
}
})
}
}
})
},
classifyFirstSearch(key) {
let query = {
inFilter: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
classifySearch(key) {
let query = {
key: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
},
filters: {},
mounted() {

@ -14,11 +14,34 @@
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" s>
<el-table-column label="是否必传" prop="require" v-if="certType == 1">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="foreign" v-if="certType == 2">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="imports" v-if="certType == 3">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span>
</template>
</el-table-column>
<el-table-column label="产品类型" prop="cplx" v-if="certType == 3">
</el-table-column>
<el-table-column label="产品类别" prop="hchzsb" v-if="certType == 3">
</el-table-column>
<el-table-column label="分类编码" prop="flbm" v-if="certType == 3">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
</el-table>
<el-pagination
@ -47,7 +70,7 @@ export default {
type: Function,
required: true,
},
certType: {
certType: { //1.2.3)
type: Object,
required: true,
},
@ -59,6 +82,10 @@ export default {
type: Object,
required: true,
},
customerId:{
type: Object,
required: true,
},
},
@ -79,6 +106,12 @@ export default {
list: [],
total: 0,
loading: false,
foreignMap: {
"1": "全部",
"2": "国外",
"3": "国内",
},
};
},
methods: {
@ -112,7 +145,8 @@ export default {
certType: this.certType,
manufacturerIdFk: this.manufacturerId,
productIdFk: this.productId,
supCertSetEntities: this.multipleSelection
supCertSetEntities: this.multipleSelection,
customerId: this.customerId,
};
selectAllCert(postQuery)
.then(response => {

@ -55,6 +55,7 @@
</el-table-column>
<el-table-column label="所在地区" prop="placeArea"></el-table-column>
<el-table-column label="所在地址" prop="placeAddress" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="所属供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
@ -96,7 +97,7 @@
:total="total"
></el-pagination>
<el-dialog
title="生产企业信息编辑"
:title="formMap[formName]"
:visible.sync="addInfoVisible"
width="80%"
:close-on-click-modal="false"
@ -256,7 +257,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
loading: false,
@ -268,7 +269,7 @@ export default {
auditStatus: 6
},
editType: 1,
fromType: 1,//1:2:
fromType: 2,//1:2:
formMap: {
add: "新增生产企业资质信息",
update: "编辑生产企业资质信息",

@ -155,7 +155,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
@ -231,7 +231,7 @@ export default {
editCompany(row) {
this.supCompanyVisible = true;
this.formName = "edit";
this.formName = "update";
this.editType = 1;
this.inputQuery = row;
},

@ -352,7 +352,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
certAuditVisible: false,

@ -144,7 +144,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},

@ -134,6 +134,13 @@
text-align: right;
margin-bottom: 8px;"
>
<el-button type="primary" size="mini" icon="search" @click="selectCert"
style="text-align:right"
>选入资质证书
</el-button
>
<el-button type="primary" size="mini" icon="search" @click="addCert"
style="text-align:right"
>添加资质证书
@ -161,6 +168,14 @@
<el-table-column label="操作" fixed="right" width="180">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native="addCert(scope.row)"
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@ -171,10 +186,29 @@
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
@click.native="deleteCompanyCert(scope.row)"
>删除
</el-button
>
<el-button
type="text"
size="small"
v-if=" scope.row.auditStatus == 1 && scope.row.status==0"
@click.native="disableCert(scope.row,1)"
>禁用
</el-button
>
<el-button
type="text"
size="small"
v-if=" scope.row.auditStatus == 1 && scope.row.status==1"
@click.native="disableCert(scope.row,0)"
>启用
</el-button
>
</template>
</el-table-column>
</el-table>
@ -222,6 +256,23 @@
</el-dialog>
<el-dialog
title="选入资质证书"
:visible.sync="selectCertVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="selectCertVisible"
append-to-body
@close='closeLocalDialog'
>
<supCertSetSelectDialog
:certType="certType"
:closeDialog="closeLocalDialog"
:customerId="customerId"
></supCertSetSelectDialog>
</el-dialog>
</el-form>
</div>
</template>
@ -237,7 +288,7 @@ import {
CodeToText,
TextToCode,
} from "element-china-area-data";
import {filterCompanyCert, deleteCompanyCert} from "../../api/purchase/companyCert";
import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "../../api/purchase/companyCert";
import corpMaintainSelect from "../../views/basic/CorpMaintainSelect"
import companyAddCert from "./supCertAddDialog";
@ -245,6 +296,7 @@ import draggable from "vuedraggable";
import {BASE_URL} from "@/config/app";
import {getUUID} from "@/utils/strUtil";
import {bindProduct} from "@/api/purchase/suppliersRegistrationBasic";
import supCertSetSelectDialog from "./../purchase/supCertSetSelectDialog";
export default {
@ -335,6 +387,7 @@ export default {
trigger: "change"
}
],
},
uploadUrl: "",
fileUrl: "",
@ -380,12 +433,15 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
editTye: 1,
selectCorpVisible: false,
selectCertVisible: false,
certType: 1,
customerId: null,
};
}
@ -399,10 +455,15 @@ export default {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.customerId = this.inputQuery.customerId;
if (this.inputQuery.areaCode != null)
this.selectedOptions = this.inputQuery.areaCode.split(",");
}
,
components: {
draggable, companyAddCert, corpMaintainSelect
draggable, companyAddCert, corpMaintainSelect, supCertSetSelectDialog
}
,
methods: {
@ -482,6 +543,7 @@ export default {
closeLocalDialog() {
this.addCertVisible = false;
this.selectCertVisible = false;
this.getCompanyCertList();
}
,
@ -512,18 +574,23 @@ export default {
}
,
addCert(index, row) {
this.inputQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.inputQuery.id = row.id;
addCert(row) {
if (this.$isNotBlank(row)) {
this.formName = 2
this.inputQuery.formData = row;
this.editTye = 2;
} else {
this.inputQuery.formData = {};
this.formName = 1;
this.editTye = 1;
}
this.addCertVisible = true;
}
,
selectCert() {
this.selectCertVisible = true;
},
toViewCompanyCert(row) {
this.certFileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath);
@ -583,6 +650,20 @@ export default {
}
,
disableCert(row, status) {
row.status = status;
updateCompanyCert(row).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("更新成功!");
this.getCompanyCertList();
} else {
this.$message.error(response.message);
}
});
},
}
,
filters: {

@ -136,7 +136,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},

@ -163,7 +163,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
loading: false,
@ -186,6 +186,7 @@ export default {
fileUrl: "",
inputQuery: {},
editType: 1,
fromType: 2,
};
},
filters: {

@ -147,7 +147,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
loading: false,

@ -401,7 +401,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
certAuditVisible: false,

@ -306,6 +306,7 @@
<supCertSetSelectDialog
:certType="certType"
:manufacturerId="manufacturerId"
:customerId="customerId"
:closeDialog="closeLocalDialog"
></supCertSetSelectDialog>
</el-dialog>
@ -458,7 +459,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
editTye: 1,
@ -468,11 +469,15 @@ export default {
2: "编辑生产企业资质证书",
},
manufacturerId: null,
customerId:null,
selectCertVisible: false,
certType: 2,
};
},
created() {
console.log(this.fromType+"----------------------");
if (this.editType == 0) {
this.inputQuery.manufacturerId = getUUID("")
} else {
@ -483,6 +488,7 @@ export default {
}
this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerId;
this.manufacturerId = this.inputQuery.manufacturerId
this.customerId = this.inputQuery.customerId;
// this.getData();
this.getCompanyCertList();
this.findMethod();
@ -499,10 +505,13 @@ export default {
this.$refs["inputQuery"].validate(valid => {
if (valid) {
this.inputQuery.auditStatus = type;
let formData = JSON.parse(JSON.stringify(this.inputQuery));
formData.auditStatus = type;
this.loading = true;
let urlName = this.editType == 0 ? 'add' : 'update';
addOrModifyCompany(this.inputQuery, urlName).then(response => {
addOrModifyCompany(formData, urlName).then(response => {
this.loading = false;
if (response.code === 20000) {
this.addCloseDialog(true);
@ -546,6 +555,7 @@ export default {
},
selectCert() {
this.customerId = this.inputQuery.customerId;
this.selectCertVisible = true;
},

@ -149,7 +149,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
loading: false,

@ -176,7 +176,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
list: [],

@ -160,7 +160,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
list: [],

@ -420,7 +420,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},

@ -42,8 +42,8 @@
size="mini"
icon="search"
v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2"
@click="onModifySubmit(4)"
>提交变更
@click="onModifySubmit(3)"
>提交审核
</el-button
>
</div>
@ -104,56 +104,35 @@
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="注册/备案号:" label-width="150px" prop="recordCode">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.recordCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="注册/备案产品名称:" label-width="150px" prop="recordProductName">
<el-form-item label="产品通用名称:" label-width="150px" prop="recordProductName">
<el-input
size="small"
disabled
placeholder="请输入内容"
v-model="inputQuery.recordProductName"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="注册/备案人名称:" label-width="150px" prop="recordPeopleName">
<el-input
size="small"
disabled
placeholder="请输入内容"
v-model="inputQuery.recordPeopleName"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="代理人名称:" label-width="150px" prop="agentName">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.agentName"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="产品类别:" label-width="150px" prop="hchzsb">
<el-select
size="small"
disabled
v-model="inputQuery.hchzsb"
placeholder="产品类别"
style="width: 100%;"
@ -169,6 +148,7 @@
size="small"
v-model="inputQuery.productType"
placeholder="器械类别"
disabled
style="width: 100%;"
>
<el-option label="器械" value="器械"></el-option>
@ -180,38 +160,40 @@
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="商品条码:" label-width="150px" prop="sptm">
<el-form-item label="注册/备案号:" label-width="150px" prop="recordCode">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.sptm"
v-model="inputQuery.recordCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="医保编码:" label-width="150px" prop="ybbm">
<el-form-item label="器械目录分类编码:" label-width="150px" prop="productDirectoryCode">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.ybbm"
disabled
v-model="inputQuery.productDirectoryCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="10" class="el-col">-->
<!-- <el-form-item label="代理人名称:" label-width="150px" prop="agentName">-->
<!-- <el-input-->
<!-- size="small"-->
<!-- placeholder="请输入内容"-->
<!-- v-model="inputQuery.agentName"-->
<!-- @input="change()"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="计量单位:" label-width="150px" prop="measname">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.measname"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="产品描述:" label-width="150px" prop="cpms">
<el-input
@ -222,23 +204,12 @@
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<el-form-item label="器械目录分类编码:" label-width="150px" prop="productDirectoryCode">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.productDirectoryCode"
@input="change()"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="规格型号:" label-width="150px" prop="specification">
<el-form-item label="规格型号:" label-width="150px" prop="specification" >
<el-input
size="small"
type="textarea"
autosize
placeholder="请输入内容"
v-model="inputQuery.specification"
@input="change()"
@ -247,6 +218,7 @@
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
<el-form-item label="备注:" label-width="150px" prop="remark">
@ -361,6 +333,7 @@
:certType="certType"
:manufacturerId="manufacturerId"
:productId="productId"
:customerId="customerId"
:closeDialog="closeLocalDialog"
></supCertSetSelectDialog>
</el-dialog>
@ -528,13 +501,14 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
editTye: 1,
manufacturerId: null,
productId: null,
customerId: null,
selectCertVisible: false,
selectSingleProductVisible: false,
selectType: 1,
@ -668,6 +642,7 @@ export default {
},
selectCert() {
this.customerId = this.inputQuery.customerId;
this.selectCertVisible = true;
},

@ -171,7 +171,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
4: "变更未审核",
3: "变更未审核",
6: "未审核",
},
list: [],

@ -23,7 +23,7 @@
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-select v-model="filterQuery.billAction" placeholder="单据类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
@ -65,16 +65,13 @@
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="第三方单据类型" prop="billTypeName"></el-table-column>
<el-table-column label="领用类型" prop="billTypeName"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName"
<el-table-column label="往来信息" prop="corpName"
show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="单据状态" prop="billFlag"></el-table-column>-->
<el-table-column label="单据日期" prop="billdate"></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
@ -125,6 +122,7 @@
:closeDialog="closeDialog"
:idQuery="idQuery"
:closeConfirmFunction="closeConfirmFunction"
:editType="formName"
></thrOrderNew>
</el-dialog>
</div>
@ -142,7 +140,7 @@ import {
getCloudErp,
} from "../../api/inout/erpOrder";
import thrOrderNew from "./thrOrderNew";
import store from "@/store";
import {getReceiveOrder} from "@/api/inout/receiveOrder";
export default {
data() {
@ -157,6 +155,7 @@ export default {
corpName: null,
type: 1,
editStatus: 1,
thirdPartyDate: 2,
},
formName: null,
formMap: {
@ -232,6 +231,7 @@ export default {
corpName: null,
type: 1,
editStatus: 1,
thirdPartyDate: 2,
};
this.actDateRange = [];
this.getList();
@ -255,7 +255,7 @@ export default {
this.filterQuery.endDate = null;
}
this.loading = true;
getCloudErp(this.filterQuery)
getReceiveOrder(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];

@ -62,8 +62,7 @@
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="第三方单据类型" prop="billTypeName"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName"
<el-table-column label="往来信息" prop="corpName"
show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据日期" prop="billdate"></el-table-column>
<el-table-column label="操作" fixed="right">
@ -101,7 +100,6 @@
import {
delThrOrders, delAll, downloadAll
} from "../../api/thrsys/thrOrder";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {getOriginBusType} from "../../api/basic/busOriginType";
@ -110,6 +108,7 @@ import {selectIp} from "../../api/param/systemParamConfig";
import {
getCloudErp,
} from "../../api/inout/erpOrder";
import {getReceiveOrder} from "@/api/inout/receiveOrder";
export default {
data() {
@ -123,7 +122,7 @@ export default {
limit: 10,
corpName: null,
type: 1,
editStatus: 0,
editStatus: 2,
},
total: 0,
thirdSys: [],
@ -189,7 +188,7 @@ export default {
limit: 10,
corpName: null,
type: 1,
editStatus: 0,
editStatus: 2,
};
this.actDateRange = [];
this.getList();
@ -214,7 +213,7 @@ export default {
this.filterQuery.endDate = null;
}
this.loading = true;
getCloudErp(this.filterQuery)
getReceiveOrder(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];

@ -13,7 +13,7 @@
>
<el-button
type="primary"
@click.native="saveOrder('0')"
@click.native="saveOrder('2')"
:loading="loading"
>提交单据
</el-button
@ -56,28 +56,42 @@
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>业务类型</span>
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
@change="actionChange" clearable>
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" style="width: 50%;" placeholder="当前仓库信息"
@change="locInChange"
clearable>
<el-option
v-for="item in busTypes"
:key="item.thirdAction"
:label="item.thirdName"
:value="item.thirdAction">
<span style="float: left">{{ item.thirdName }}</span>
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" style="width: 50%;"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>往来单位</span>
<span>往来信息</span>
</div>
</el-col>
<el-col :span="7">
@ -86,6 +100,7 @@
v-model="formData.corpName"
filterable
remote
style="width: 50%"
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
@ -104,27 +119,41 @@
}}</span>
</el-option>
</el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
style="width: 50%"
>
<el-option
v-for="item in fromSubStorageOptions"
:key="item.code"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
<span>领用类型</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择领用类型" style="width: 100%"
clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
v-for="item in busTypes"
:key="item.originAction"
:label="item.originName"
:value="item.originAction">
<span style="float: left">{{ item.originName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -132,22 +161,13 @@
<el-col :span="3">
<div class="ao-text">
<span>当前分库</span>
<span>备注</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-form-item prop="remark">
<el-input v-model="formData.remark" auto-complete="off"></el-input>
</el-form-item>
</el-col>
@ -274,20 +294,6 @@
</el-card>
</el-form>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
<el-dialog
title="库存产品录入"
@ -302,6 +308,7 @@
:closeDialog="closeDialogC2"
:data="thisData"
:invQueryData="invQueryData"
:type="1"
></dialogInvProduct>
</el-dialog>
</div>
@ -326,8 +333,8 @@ import stockOrderNewSelectProduct from "../business/stockOrderNewSelectProduct";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain";
import {filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct"
import {getOriginJoinBusType} from "@/api/basic/busOriginType";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive";
import {getBusChange} from "@/api/basic/busTypeChange";
import {inserThrOrderWeb, updateReceive} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -346,6 +353,10 @@ export default {
type: Function,
required: true,
},
editType: {
type: Object,
required: true,
},
},
data() {
return {
@ -391,6 +402,7 @@ export default {
subInvList: [],
fromOptions: [],
fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0,
loading: false,
index: null,
@ -412,10 +424,6 @@ export default {
1: "预入库",
2: "普通采购",
},
curAction: {
corpType: 0,
genUnit: false,
},
orderEditor: true,
iCount: 0,
sOptions: [],
@ -425,11 +433,11 @@ export default {
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
selectInvProductVisible: false,
thisData: {},
storageList: [],
invQueryData: {},
type: 1,
};
},
@ -506,8 +514,11 @@ export default {
console.log(row);
this.formData.corpId = row.code;
this.formData.corpName = row.name;
this.findSubStorageMethod();
},
getStorage(event) {
//
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
@ -518,6 +529,23 @@ export default {
});
},
//
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
@ -525,7 +553,9 @@ export default {
}
}
},
findStorageMethod(query) {
//
findStorageMethod() {
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@ -545,27 +575,60 @@ export default {
.catch(() => {
});
},
//
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.corpId,
filter: 2,
};
filterSubByInv(cQuery)
.then((response) => {
this.fromSubStorageOptions = response.data || [];
})
.catch(() => {
});
},
submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交';
this.loading = true;
let tQuery = this.formData;
tQuery.editStatus = status;
tQuery.subErpOrders = this.codeArray;
// tQuery.billType = this.formData.bi;
console.log(tQuery);
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
tQuery.thirdPartyDate = 2;
if (this.editType === "add") {
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
} else if (this.editType === "update") {
updateReceive(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
}
},
selectProductFunction(event) {
@ -591,25 +654,20 @@ export default {
if (this.orderEditor) {
this.thisData.orderId = this.formData.id
}
this.curAction = this.getActionItem(this.formData.billType);
this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData;
this.thisData.formData.thirdSysFk = this.curAction.thirdSys;
this.thisData.billType = this.curAction.localAction;
this.invQueryData = {
locStorageCode: this.formData.locStorageCode,
};
this.selectInvProductVisible = true;
return;
}
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false;
this.thisData = {};
@ -858,13 +916,11 @@ export default {
},
getBusType() {
let query = {
enabled: true,
corpType: 1,
enable: false,
};
getOriginJoinBusType(query)
getBusChange(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.curAction = this.busTypes[0];
})
.catch(() => {
});
@ -875,41 +931,6 @@ export default {
this.formData.corpId = event.erpId;
this.formData.unitIdFk = event.erpId;
},
findMethod(query) {
this.fromOptions = [];
let cQuery = {
key: query,
corpType: null,
outType: null,
};
if (this.curAction.corpType == 3) {//
cQuery.corpType = 4;
this.formData.corpId = this.curAction.defaultUnit;
} else if (this.curAction.corpType == 2)//
{
cQuery.corpType = 4;
cQuery.outType = 2;
} else if (this.curAction.corpType == 0) {
cQuery.corpType = 2;
} else return;
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.page.list || [];
if (this.curAction.corpType == 3) {
for (let i = 0; i < this.fromOptions.length; i++) {
if (this.fromOptions[i].erpId == this.formData.corpId) {
this.formData.corpName = this.fromOptions[i].name;
}
}
}
})
.catch(() => {
this.loading = false;
});
},
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].thirdAction === action) {
@ -917,36 +938,15 @@ export default {
}
}
},
actionChange(item) {
this.curAction = this.getActionItem(item);
this.locInChange();
this.findMethod();
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.$forceUpdate();
this.getBusType(item);
this.findStorageMethod();
this.findSubInvs();
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
}
},
@ -986,8 +986,10 @@ export default {
this.getBusType();
this.getStorage();
this.findSubInvByInv();
this.findSubInvs();
this.findStorageMethod();
this.findSubStorageMethod();
// this.findSubInvByInv();
this.codeArray = [];
this.closeConfirmFunction(false);
},

Loading…
Cancel
Save