Merge remote-tracking branch 'origin/otherChange' into featFunction
# Conflicts: # src/views/purchase/purApplyEditDiaolog.vue # src/views/purchase/purPlanEditDialog.vue # src/views/purchase/pureApplyDetailDialog.vuefeatFunction
commit
9b8d8945cc
@ -0,0 +1,224 @@
|
||||
<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>领用类型名称: </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>领用类型代码: </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>目标单据类型: </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>启用状态: </span>
|
||||
</div>
|
||||
<el-select
|
||||
size="small"
|
||||
:disabled="inputQuery.systemDefault"
|
||||
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>设置类型: </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-select-->
|
||||
<!-- size="small"-->
|
||||
<!-- :disabled="inputQuery.systemDefault"-->
|
||||
<!-- v-model="inputQuery.type"-->
|
||||
<!-- placeholder="设置类型"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option label="耗材领用" :value="1"></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>备注: </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>
|
||||
@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card" style="margin-top: -15px">
|
||||
<el-form :inline="true" :model="filterQuery" style="display: flex;" 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 type="primary" icon="search" @click="combine"
|
||||
>确定
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="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="auditByName"></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>
|
||||
<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="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="count"></el-table-column>
|
||||
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" 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="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName" show-overflow-tooltip="true"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pureApplyDetail from "./pureApplyDetailDialog";
|
||||
import {delApply, auditOrder, listApplyDetail, auditListApply} from "@/api/purchase/purApply";
|
||||
import {selectApply} from "@/api/purchase/purPlan";
|
||||
import {getStockOrderDetailInstrumentById} from "@/api/warehouse/stockOrder";
|
||||
|
||||
export default {
|
||||
name: "selectApplyListDialog",
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
closeDialog: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
|
||||
billAction: null,
|
||||
billNo: "",
|
||||
originType: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
formName: null,
|
||||
statusMap: {
|
||||
1: "草稿",
|
||||
2: "未审核",
|
||||
3: "已审核",
|
||||
4: "已拒绝"
|
||||
},
|
||||
ids: [],
|
||||
idQuery: {},
|
||||
editType: 2,
|
||||
total: 0,
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
busTypes: [],
|
||||
originTypes: [],
|
||||
list: [],
|
||||
detailList: [],
|
||||
loading: false,
|
||||
currentRow: null,
|
||||
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) {
|
||||
this.currentRow = row;
|
||||
let query = {orderIdFk: row.id};
|
||||
this.loading = true;
|
||||
listApplyDetail(query) //查找该单号下的所有条码
|
||||
.then((response) => {
|
||||
this.detailList = response.data.list || [];
|
||||
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();
|
||||
},
|
||||
|
||||
combine() {
|
||||
if (this.$isBlank(this.currentRow.id)) {
|
||||
return;
|
||||
}
|
||||
if (this.ids.length > 0) {
|
||||
for (var i = 0; i < this.ids.length; i++) {
|
||||
for (let j = 0; j < this.detailList.length; j++) {
|
||||
if (this.ids[i] == this.detailList[j].productId) {
|
||||
this.$message.error("该申购单已有产品被选入!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let productDatas = [];
|
||||
for (let j = 0; j < this.detailList.length; j++) {
|
||||
let data = {
|
||||
relId: this.detailList[j].productId,
|
||||
supId: this.detailList[j].supId,
|
||||
zczbhhzbapzbh: this.detailList[j].zczbhhzbapzbh,
|
||||
count:this.detailList[j].count,
|
||||
}
|
||||
productDatas.push(data);
|
||||
}
|
||||
this.loading = true;
|
||||
let tQuery = {
|
||||
datas: productDatas,
|
||||
stockOrderLists: this.data.stockOrderLists,
|
||||
purType: 1,
|
||||
};
|
||||
getStockOrderDetailInstrumentById(tQuery).then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.closeDialog(response.data);
|
||||
} else {
|
||||
if (response.code == 601) {
|
||||
this.$alert(response.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
} else
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
let end = new Date();
|
||||
let start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.actDateRange = [start, end];
|
||||
this.getList();
|
||||
|
||||
this.ids = [];
|
||||
if (this.data.stockOrderLists.length > 0) {
|
||||
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
|
||||
this.ids.push(this.data.stockOrderLists[i].productId);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
components: {
|
||||
pureApplyDetail
|
||||
},
|
||||
|
||||
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
3: "success",
|
||||
4: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
}
|
||||
,
|
||||
}
|
||||
,
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
div /deep/ .el-table .warning-row {
|
||||
background: #bebebe;
|
||||
}
|
||||
|
||||
div /deep/ .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue