|
@@ -33,7 +33,7 @@
|
|
|
<el-table-column label="商品类别" prop="prodType" />
|
|
|
<el-table-column label="商品分类" prop="drugListId" />
|
|
|
<el-table-column label="规格" prop="spec" />
|
|
|
- <el-table-column label="型号" prop="model" />
|
|
|
+ <el-table-column label="型号" prop="mol" />
|
|
|
<el-table-column label="材质" prop="matl" />
|
|
|
<el-table-column label="生产来源" prop="source" />
|
|
|
<el-table-column label="注册证号" prop="approveNo" />
|
|
@@ -181,22 +181,18 @@
|
|
|
</el-table>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+ <div class="foot-button" style="margin-top: 30px">
|
|
|
+ <!-- <el-button type="success" @click="handleSave">保存</el-button> -->
|
|
|
+ <el-button type="primary" @click="handleDelivery">出库</el-button>
|
|
|
+ </div>
|
|
|
<el-dialog title="提取采购单" :visible.sync="dialog" width="70%">
|
|
|
<template>
|
|
|
- <el-form
|
|
|
- :model="listQuery"
|
|
|
- ref="listQuery"
|
|
|
- :inline="true"
|
|
|
- label-width="90px"
|
|
|
- >
|
|
|
- <el-form-item size="mini" label="采购单号" prop="id" class="long">
|
|
|
+ <el-form :model="listQuery" ref="listQuery" :inline="true" label-width="90px">
|
|
|
+ <el-form-item size="mini" label="采购单号" prop="id" class="long">
|
|
|
<el-input v-model="listQuery.id" placeholder="请输入采购单号"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item size="mini" label="采购员" prop="docmker" class="long">
|
|
|
- <el-input
|
|
|
- v-model="listQuery.docmker"
|
|
|
- placeholder="请输入采购员"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item size="mini" label="采购员" prop="docmker" class="long">
|
|
|
+ <el-input v-model="listQuery.docmker" placeholder="请输入采购员"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item size="mini" label="耗材名称" prop="prodName" class="long">
|
|
|
<el-input
|
|
@@ -205,13 +201,9 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item size="mini" label="医保编码" prop="hiCode" class="long">
|
|
|
- <el-input
|
|
|
- v-model="listQuery.hiCode"
|
|
|
- placeholder="请输入医保编码"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="listQuery.hiCode" placeholder="请输入医保编码"></el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="getdialog('search')">查询</el-button>
|
|
|
<el-button @click="resetdialog('consumableData')">重置</el-button>
|
|
@@ -219,7 +211,7 @@
|
|
|
</el-form>
|
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
|
- v-loading="listdialogLoading"
|
|
|
+ v-loading="dialogLoading"
|
|
|
element-loading-text="加载中"
|
|
|
fit
|
|
|
stripe
|
|
@@ -231,10 +223,10 @@
|
|
|
height="500"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
highlight-current-row
|
|
|
+ :default-sort="{ prop: 'hiCode', order: 'descending' }"
|
|
|
>
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
|
- :selectable="selected"
|
|
|
:reserve-selection="true"
|
|
|
width="55"
|
|
|
></el-table-column>
|
|
@@ -249,10 +241,6 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="fasBtch" label="集采批次"> </el-table-column>
|
|
|
- <!-- <el-table-column prop="splb" label="商品类别">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="spfl" label="商品分类">
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column prop="spec" label="规格"> </el-table-column>
|
|
|
<el-table-column prop="mol" label="型号"> </el-table-column>
|
|
|
<el-table-column prop="matl" label="材质"> </el-table-column>
|
|
@@ -269,13 +257,12 @@
|
|
|
<el-table-column prop="agnt" label="代理企业" width="150"> </el-table-column>
|
|
|
</el-table>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="handleConfirm">确认</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="handleConfirm">确认</el-button>
|
|
|
</div>
|
|
|
<!--分页-->
|
|
|
<yl-pagination
|
|
|
- v-show="totalC > 0"
|
|
|
- :total="totalC"
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
:page.sync="listQuery.current"
|
|
|
:limit.sync="listQuery.size"
|
|
|
@pagination="getdialog"
|
|
@@ -294,40 +281,75 @@ export default {
|
|
|
listForm: {
|
|
|
aa: "",
|
|
|
},
|
|
|
- planForm:{},
|
|
|
- // 表格数据
|
|
|
- loding:false,
|
|
|
- tableData:[],
|
|
|
- // 弹框表格数据
|
|
|
- dialog:false,
|
|
|
- listQuery:{
|
|
|
- hiCode:"",
|
|
|
- prodName:"",
|
|
|
- id:"",
|
|
|
- docmker:"",
|
|
|
+ planForm: {},
|
|
|
+ // 表格数据
|
|
|
+ loding: false,
|
|
|
+ tableData: [],
|
|
|
+ // 弹框表格数据
|
|
|
+ dialog: false,
|
|
|
+ listQuery: {
|
|
|
+ hiCode: "",
|
|
|
+ prodName: "",
|
|
|
+ id: "",
|
|
|
+ docmker: "",
|
|
|
},
|
|
|
- consumableData:[]
|
|
|
+ consumableData: [],
|
|
|
+ selectData: [],
|
|
|
+ dialogLoading:false,
|
|
|
+ Loading:false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
getDetails() {
|
|
|
this.$refs["planForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.dialog=true;
|
|
|
- // this.$confirm("确认提交", "提示", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // }).then(() => {
|
|
|
-
|
|
|
- // });
|
|
|
+ this.dialog = true;
|
|
|
+ this.getdialog();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.tidata.clearSelection();
|
|
|
+ this.tableData.forEach((i) => {
|
|
|
+ this.consumableData.forEach((row) => {
|
|
|
+ if (i.id == row.id) {
|
|
|
+ this.$refs.tidata.toggleRowSelection(row, true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
- // else{
|
|
|
- // this.$message.warning("请输入随货同行单号")
|
|
|
- // }
|
|
|
});
|
|
|
},
|
|
|
- // 合并列
|
|
|
+ // 列表数据
|
|
|
+ getData() {
|
|
|
+ this.Loading = true;
|
|
|
+ getPurcOrdDrugList(this.listForm)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.data.records;
|
|
|
+ this.Loading = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.Loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 采购明细数据
|
|
|
+ getdialog() {
|
|
|
+ if (type == "search") {
|
|
|
+ this.listQuery.current = 1;
|
|
|
+ }
|
|
|
+ this.dialogLoading = true;
|
|
|
+ getPurcOrdDrugList(this.listQuery)
|
|
|
+ .then((res) => {
|
|
|
+ this.consumableData = res.data.records;
|
|
|
+ this.consumableData.forEach((i) => {
|
|
|
+ i.docmkDate = moment(i.docmkDate).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ });
|
|
|
+ this.total = res.data.total;
|
|
|
+ this.dialogLoading = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.dialogLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 合并列
|
|
|
handleSpan({ row, column, rowIndex, columnIndex }) {
|
|
|
if (
|
|
|
columnIndex === 1 ||
|
|
@@ -343,7 +365,7 @@ export default {
|
|
|
columnIndex === 11 ||
|
|
|
columnIndex === 12 ||
|
|
|
columnIndex === 13 ||
|
|
|
- columnIndex === 14
|
|
|
+ columnIndex === 14
|
|
|
) {
|
|
|
// console.log("单元格数组,若下一项为0,则代表合并上一项", this.cellList);
|
|
|
const rowCell = this.cellList[rowIndex];
|
|
@@ -381,9 +403,88 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
//弹框选择
|
|
|
- handleSelectionChange(){
|
|
|
-
|
|
|
- }
|
|
|
+ handleSelectionChange() {
|
|
|
+ this.selectData = e;
|
|
|
+ },
|
|
|
+ // 出库
|
|
|
+ handleDelivery() {
|
|
|
+ if (this.tableData.length != 0) {
|
|
|
+ this.$refs.tabledata.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let data = this.tableData.map((i) => {
|
|
|
+ return i.purcOrdId;
|
|
|
+ });
|
|
|
+ let data2 = data.slice(1);
|
|
|
+ let qwe = data2.some((item) => {
|
|
|
+ if (item != data[0]) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (qwe == true) {
|
|
|
+ this.$message.info("请勾选同一采购单明细");
|
|
|
+ } else {
|
|
|
+ this.$confirm("确认出库", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ let data = this.tableData.map((i) => {
|
|
|
+ return {
|
|
|
+ drugListId: i.drugListId,
|
|
|
+ delvCnt: i.delvCnt,
|
|
|
+ lotNum: i.lotNum,
|
|
|
+ manuDate: i.manuDate,
|
|
|
+ prodExpy: i.prodExpy,
|
|
|
+ invoFileId: i.invoFileId,
|
|
|
+ dyntFileId: i.dyntFileId,
|
|
|
+ delvPric: i.purcPric,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ let data2 = {
|
|
|
+ delvOrdId: "",
|
|
|
+ spdId: "",
|
|
|
+ dyntNo: this.listForm.dyntNo,
|
|
|
+ purcOrdId: this.tableData[0].purcOrdId,
|
|
|
+ detlList: data,
|
|
|
+ };
|
|
|
+ this.confirmLoadLoad = true;
|
|
|
+ submitDelvOrd(data2)
|
|
|
+ .then((res) => {
|
|
|
+ this.confirmLoadLoad = false;
|
|
|
+ this.getTiData();
|
|
|
+ this.tableData = [];
|
|
|
+ this.selectData = [];
|
|
|
+ this.$message({
|
|
|
+ message: "出库成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.listForm.dyntNo = "";
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.confirmLoadLoad = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "请填写必填项信息",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // }else{
|
|
|
+ // this.$message({
|
|
|
+ // type: "info",
|
|
|
+ // message: "随货同行单号不能为空",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "出库数据不能为空",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|