申购代码提交

prod
郑明梁 2 years ago
parent 8565b92ac5
commit 2471e5b032

@ -3,19 +3,50 @@
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch"> <el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="10">
<el-form-item label=":"> <el-form-item label="申购单号">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="单据号" clearable></el-input> <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="单据日期:"> <el-col :span="10">
<el-form-item label="申购仓库">
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" placeholder="请选择所属仓库">
<el-option
v-for="item in invList"
: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-row>
<el-row>
<el-col :span="10">
<el-form-item label="申购部门">
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择采购仓库" style="width: 90%">
<el-option
v-for="item in deptList"
:key="item.code"
: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="10">
<el-form-item label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
style="width: 90%"
type="daterange" type="daterange"
format="yyyy 年 MM 月 dd 日" format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -25,6 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
@ -40,15 +72,16 @@
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border highlight-current-row> <el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="由购单号" prop="billNo"></el-table-column>
<el-table-column label="申购日期" prop="billDate"> <el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.billDate, '{y}-{m}-{d}') }}</span> {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申购人" prop="createByName"></el-table-column> <el-table-column label="到货时间" prop="arrivalTime" ></el-table-column>
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
<el-table-column label="申购分库" prop="targetDeptName"></el-table-column>
<el-table-column label="申购说明" prop="remark"></el-table-column> <el-table-column label="申购说明" prop="remark"></el-table-column>
<el-table-column label="状态" prop="status"> <el-table-column label="状态" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
@ -57,8 +90,6 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120px"> <el-table-column label="操作" width="120px">
<template slot-scope="scope"> <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="newDistributionForm(scope.$index, scope.row)">编辑</el-button>
@ -80,13 +111,14 @@
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="120"></el-table-column> <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="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="申购数量" prop="count"></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="measname"></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-column label="供应商" prop="supName" 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="zczbhhzbapzbh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
@ -112,6 +144,8 @@
<script> <script>
import pureApplyEdit from "./purApplyEditDiaolog"; import pureApplyEdit from "./purApplyEditDiaolog";
import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply"; import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply";
import { getInvListByUser } from '@/api/system/invWarehouse'
import { getDeptListByUser } from '@/api/auth/authDept'
export default { export default {
data() { data() {
@ -141,13 +175,21 @@ export default {
3: "已审核", 3: "已审核",
4: "已拒绝" 4: "已拒绝"
}, },
emergencyMap:{
1: "普通",
2: "紧急",
3: "不紧急",
},
idQuery: {}, idQuery: {},
total: 0, total: 0,
thirdSys: [], thirdSys: [],
invList:{},
deptList:{},
thirdSysDetail: null, thirdSysDetail: null,
busTypes: [], busTypes: [],
originTypes: [], originTypes: [],
list: [], list: [],
createTimes:null,
detailList: [], detailList: [],
loading: false, loading: false,
actDateRange: [], actDateRange: [],
@ -342,6 +384,17 @@ export default {
this.formName = "add"; this.formName = "add";
this.newSpDistributionVisible = true; this.newSpDistributionVisible = true;
}, },
getInvList() {
getInvListByUser().then((res) => {
this.invList = res.data || [];
this.getBusType();
})
},
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
});
},
} }
, ,
@ -369,6 +422,8 @@ export default {
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getList(); this.getList();
this.getInvList();
this.getDeptList();
} }
, ,
} }

@ -31,6 +31,31 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: -10px">
<el-col :span="11">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="formData.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
<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-col :span="11">
<el-form-item label="到货时间:" prop="arrivalTime">
<el-date-picker
v-model="formData.arrivalTime"
type="datetime"
placeholder="选择日期"
style="width: 90%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: -10px"> <el-row style="margin-top: -10px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="申购科室:" prop="locStorageCode"> <el-form-item label="申购科室:" prop="locStorageCode">
@ -253,6 +278,12 @@ export default {
if(this.formData.targetInvCode=="" || this.formData.targetInvCode==null){ if(this.formData.targetInvCode=="" || this.formData.targetInvCode==null){
return this.$message.error("采购科室不能为空!"); return this.$message.error("采购科室不能为空!");
} }
if(this.formData.emergency=="" || this.formData.emergency==null){
return this.$message.error("紧急程度不能为空!");
}
if(this.formData.arrivalTime=="" || this.formData.arrivalTime==null){
return this.$message.error("到货时间不能为空!");
}
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {

Loading…
Cancel
Save