|
@@ -0,0 +1,697 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <!-- 永济项目没有订单状态 制单人-->
|
|
|
+ <div class="common-card">
|
|
|
+ <h3>单据信息</h3>
|
|
|
+ <el-form
|
|
|
+ :model="listForm"
|
|
|
+ ref="listform"
|
|
|
+ label-width="237px"
|
|
|
+ class="grid-form-class"
|
|
|
+ >
|
|
|
+ <div class="form-body">
|
|
|
+ <div class="flex-css">
|
|
|
+ <el-form-item label="采购单号" prop="id">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.id }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="明细条数" prop="detlCnt">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.detlCnt }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flex-css">
|
|
|
+ <el-form-item
|
|
|
+ label="采购方上级"
|
|
|
+ prop="prntOrgName"
|
|
|
+ v-if="hospId == '4'"
|
|
|
+ >
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.prntOrgName }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="采购方" prop="orgName">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.orgName }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flex-css">
|
|
|
+ <el-form-item label="制单时间" prop="docmkDate">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.docmkDate }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="当前状态" prop="stas">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.stas }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flex-css" v-if="hospId == '4'">
|
|
|
+ <el-form-item label="客户名称" prop="docmker">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.docmker }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" prop="docmkerConinfo">
|
|
|
+ <div class="content">
|
|
|
+ {{ listForm.docmkerConinfo }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="common-card">
|
|
|
+ <h3>订单明细</h3>
|
|
|
+ <el-form :model="list">
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ element-loading-text="加载中"
|
|
|
+ :data="list"
|
|
|
+ fit
|
|
|
+ stripe
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <template slot="empty">
|
|
|
+ <img src="@/assets/nopage.png" alt />
|
|
|
+ <p>暂无数据</p>
|
|
|
+ </template>
|
|
|
+ <el-table-column fixed type="index" label="序号" width="60" />
|
|
|
+ <el-table-column label="药品编码" prop="drugListId" />
|
|
|
+ <el-table-column label="药品名称" prop="" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="drug-name">
|
|
|
+ <el-tag>{{ scope.row.drugName }}</el-tag
|
|
|
+ >{{ "【" + scope.row.dosformName + "】"
|
|
|
+ }}<el-tag>{{ scope.row.essdrugType }}</el-tag
|
|
|
+ ><br />
|
|
|
+ {{ "生产厂家 【" + scope.row.prodentpName + "】" }}<br />
|
|
|
+ {{
|
|
|
+ "药品规格 【" +
|
|
|
+ scope.row.specName +
|
|
|
+ "*" +
|
|
|
+ scope.row.convrat +
|
|
|
+ scope.row.prepunt +
|
|
|
+ "/" +
|
|
|
+ scope.row.pacUnt +
|
|
|
+ "】"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订货数量" prop="purcCnt" />
|
|
|
+ <el-table-column label="采购价" prop="purcPric" />
|
|
|
+ <el-table-column label="采购金额" prop="purcAmt" />
|
|
|
+ <el-table-column label="对码状态" prop="matchCodeStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="scope.row.matchCodeStatus == '0'"
|
|
|
+ @click="handleDui(scope.row)"
|
|
|
+ >未对码</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="scope.row.matchCodeStatus == '1'"
|
|
|
+ @click="handleDui(scope.row)"
|
|
|
+ >已对码</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="对码信息" prop="splerDrugName" width="250px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="drug-name" v-if="scope.row.splerDrugName">
|
|
|
+ <el-tag>{{ scope.row.splerDrugName }}</el-tag>
|
|
|
+ {{ "【" + scope.row.splerDosformName + "】" }}
|
|
|
+ <el-tag v-if="scope.row.splerEssdrugType">{{
|
|
|
+ scope.row.splerEssdrugType === "0"
|
|
|
+ ? "非基药"
|
|
|
+ : scope.row.splerEssdrugType === "1"
|
|
|
+ ? "基药"
|
|
|
+ : scope.row.splerEssdrugType
|
|
|
+ }}</el-tag
|
|
|
+ ><br />
|
|
|
+ {{ "供应商厂家 【" + scope.row.splerProdentpName + "】" }}<br />
|
|
|
+ {{
|
|
|
+ "供应商规格 【" +
|
|
|
+ scope.row.splerSpecName +
|
|
|
+ "*" +
|
|
|
+ scope.row.convrat +
|
|
|
+ scope.row.splerPrepunt +
|
|
|
+ "/" +
|
|
|
+ scope.row.splerPacUnt +
|
|
|
+ "】"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="转单状态" prop="isZd">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.isZd == '0'" type="ifo">未转单</el-tag>
|
|
|
+ <el-tag v-if="scope.row.isZd == '1'" type="success"
|
|
|
+ >已转单</el-tag
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否转备案" prop="isFil" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.isFil == '0'">否</span>
|
|
|
+ <span v-if="scope.row.isFil == '1'">是</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="转备案原因" prop="filMsg" width="100px" />
|
|
|
+ <el-table-column label="是否驳回" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch
|
|
|
+ v-model="scope.row.flag"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ @change="handleSwitch(scope.$index, scope.row)"
|
|
|
+ :disabled="!isShow"
|
|
|
+ ></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="驳回原因" prop="rejtRea" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ label-width="0"
|
|
|
+ class="item"
|
|
|
+ :prop="scope.$index + '.rejtRea'"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="scope.row.rejtRea"
|
|
|
+ :readonly="!scope.row.flag"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div class="foot-button">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleAccept"
|
|
|
+ :loading="aaLoad"
|
|
|
+ v-if="listForm.stas === '未受理'"
|
|
|
+ >受理</el-button
|
|
|
+ >
|
|
|
+ <el-button type="info" @click="goback">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 添加药品 -->
|
|
|
+ <el-dialog title="选择医院客户" :visible.sync="dialogHosp" width="60%">
|
|
|
+ <el-table
|
|
|
+ v-loading="tableLoading"
|
|
|
+ element-loading-text="加载中"
|
|
|
+ :data="tableData"
|
|
|
+ fit
|
|
|
+ stripe
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <template slot="empty">
|
|
|
+ <img src="@/assets/nopage.png" alt />
|
|
|
+ <p>暂无数据</p>
|
|
|
+ </template>
|
|
|
+ <el-table-column fixed type="index" label="序号" width="60" />
|
|
|
+ <el-table-column label="客户id" prop="customerId" />
|
|
|
+ <el-table-column label="客户名称" prop="customerName" />
|
|
|
+ <el-table-column fixed="right" label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="primary" plain @click="handleRow(scope.row)"
|
|
|
+ >选择</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 对码 -->
|
|
|
+ <el-dialog title="药品对码" :visible.sync="dialogDui" width="70%">
|
|
|
+ <template>
|
|
|
+ <h3 style="margin: 10px 0">选中药品信息:</h3>
|
|
|
+ <el-table :data="selectDrguData" border style="width: 100%">
|
|
|
+ <el-table-column fixed prop="drugName" label="药品名称" width="150" />
|
|
|
+ <el-table-column prop="dosformName" label="剂型名称" width="120" />
|
|
|
+ <el-table-column prop="prodentpName" label="生产企业" />
|
|
|
+ <el-table-column prop="drugListId" label="药品编码" width="80" />
|
|
|
+ <el-table-column prop="specName" label="规格" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="drug-name">
|
|
|
+ {{
|
|
|
+ "医院规格 【" +
|
|
|
+ scope.row.specName +
|
|
|
+ "*" +
|
|
|
+ scope.row.convrat +
|
|
|
+ scope.row.prepunt +
|
|
|
+ "/" +
|
|
|
+ scope.row.pacUnt +
|
|
|
+ "】"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="purcPric" label="价格" width="80" />
|
|
|
+ </el-table>
|
|
|
+ <h3 style="margin: 10px 0">供应商药品目录:</h3>
|
|
|
+ <el-form :model="supQuery" ref="supQuery" :inline="true">
|
|
|
+ <el-form-item label="药品名称" prop="splerDrugName" class="long">
|
|
|
+ <el-input
|
|
|
+ v-model="supQuery.splerDrugName"
|
|
|
+ placeholder="请输入药品名称"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="药品编码" prop="splerDrugListId" class="long">
|
|
|
+ <el-input
|
|
|
+ v-model="supQuery.splerDrugListId"
|
|
|
+ placeholder="请输入药品编码"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="searchSup('search')"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="reset('sup')">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form :model="form" ref="form" :rules="rules">
|
|
|
+ <el-table
|
|
|
+ :data="form.splerData"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ v-loading="supLoading"
|
|
|
+ max-height="300"
|
|
|
+ >
|
|
|
+ <el-table-column prop="splerDrugName" label="药品名称" width="170">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="splerDosformName" label="剂型名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="splerProdentpName" label="生产企业">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="splerDrugListId" label="药品编码">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="规格" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="drug-name">
|
|
|
+ {{
|
|
|
+ "供应商规格 【" +
|
|
|
+ scope.row.splerSpecName +
|
|
|
+ "*" +
|
|
|
+ scope.row.splerPrepunt +
|
|
|
+ "/" +
|
|
|
+ scope.row.splerPacUnt +
|
|
|
+ "】"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="drugListId" label="库存" width="80" />
|
|
|
+ <el-table-column prop="address" label="转换比" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-row>
|
|
|
+ <el-col span="11">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'splerData.' + scope.$index + '.conNum'"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ pattern: /^[\-\+]?([1-9]\d*|([1-9]\d*\/[1-9]\d*))$/,
|
|
|
+ message: '输入正整数',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.conNum"
|
|
|
+ placeholder="请输入转换比"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col span="2"
|
|
|
+ ><span style="margin: 0 10px">/</span></el-col
|
|
|
+ >
|
|
|
+ <el-col span="11">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'splerData.' + scope.$index + '.conDen'"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ pattern: /^[\-\+]?([1-9]\d*|([1-9]\d*\/[1-9]\d*))$/,
|
|
|
+ message: '输入正整数',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.conDen"
|
|
|
+ placeholder="请输入转换比"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="handleClick(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >对码</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!--分页-->
|
|
|
+ <yl-pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="supQuery.current"
|
|
|
+ :limit.sync="supQuery.size"
|
|
|
+ @pagination="searchSup"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import ylStep from "@/components/yl-step";
|
|
|
+import ylPagination from "@/components/yl-pagination";
|
|
|
+// import { getDetlList } from "@/api/purchasing-management/procurement-order-management";
|
|
|
+import rulesR from "@/utils/rules";
|
|
|
+import {
|
|
|
+ acpOrd,
|
|
|
+ transfer,
|
|
|
+ getSplerCustomerList
|
|
|
+} from "@/api/orderManage-sup/index";
|
|
|
+// import { QuerySplerDrugList, DrugMatch } from "@/api/drugCataManage-sup/index";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ ylStep,
|
|
|
+ ylPagination
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ listForm: {
|
|
|
+ id: "",
|
|
|
+ detlCnt: "",
|
|
|
+ orgName: "",
|
|
|
+ docmker: "",
|
|
|
+ docmkDate: "",
|
|
|
+ stas: "",
|
|
|
+ zdCustomerName: "",
|
|
|
+ zdCustomerId: ""
|
|
|
+ },
|
|
|
+ listLoading: false,
|
|
|
+ list: [],
|
|
|
+ aaLoad: false,
|
|
|
+ zdLoad: false,
|
|
|
+ isShow: false,
|
|
|
+ returnInfo: false,
|
|
|
+ stasOptions: [
|
|
|
+ { value: "A", lable: "未受理" },
|
|
|
+ { value: "B", lable: "已受理" },
|
|
|
+ { value: "R", lable: "被驳回" },
|
|
|
+ { value: "C", lable: "已出库" },
|
|
|
+ { value: "D", lable: "部分出库" },
|
|
|
+ { value: "Y", lable: "已入库" },
|
|
|
+ { value: "P", lable: "部分入库" }
|
|
|
+ ],
|
|
|
+ essdrugOptions: ["非基药", "基药"],
|
|
|
+ // 医院客户
|
|
|
+ hospShow: true,
|
|
|
+ dialogHosp: false,
|
|
|
+ tableData: [],
|
|
|
+ listindex: "",
|
|
|
+ listtext: "",
|
|
|
+ // 对码
|
|
|
+ supQuery: {
|
|
|
+ current: 1,
|
|
|
+ size: 5,
|
|
|
+ splerDrugName: "",
|
|
|
+ splerDrugListId: "",
|
|
|
+ hospId: "",
|
|
|
+ drugListId: ""
|
|
|
+ },
|
|
|
+ duiId: "",
|
|
|
+ total: 0,
|
|
|
+ dialogDui: false,
|
|
|
+ selectDrguData: [],
|
|
|
+ form: {
|
|
|
+ splerData: []
|
|
|
+ },
|
|
|
+ hospId: ""
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.$route.query.stas == "A") {
|
|
|
+ this.isShow = true;
|
|
|
+ } else {
|
|
|
+ this.isShow = false;
|
|
|
+ }
|
|
|
+ this.listForm.id = this.$route.query.id;
|
|
|
+ this.listForm.detlCnt = this.$route.query.detlCnt;
|
|
|
+ this.listForm.orgName = this.$route.query.orgName;
|
|
|
+ this.listForm.docmker = this.$route.query.docmker;
|
|
|
+ this.listForm.docmkDate = this.$route.query.docmkDate;
|
|
|
+ this.listForm.prntOrgName = this.$route.query.prntOrgName;
|
|
|
+ this.listForm.docmkerConinfo = this.$route.query.docmkerConinfo;
|
|
|
+ this.stasOptions.forEach(i => {
|
|
|
+ if (i.value == this.$route.query.stas) {
|
|
|
+ this.listForm.stas = i.lable;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getData();
|
|
|
+ if (this.$route.query.ifCustomer == "0") {
|
|
|
+ this.hospShow = true;
|
|
|
+ } else {
|
|
|
+ this.hospShow = false;
|
|
|
+ }
|
|
|
+ this.hospId = this.$route.query.hospId;
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ goback() {
|
|
|
+ this.$router.push({
|
|
|
+ name: "purOrderAccept",
|
|
|
+ params: {
|
|
|
+ hospId: this.$route.query.hospId,
|
|
|
+ current: this.$route.query.current
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //
|
|
|
+ // getData() {
|
|
|
+ // this.listLoading = true;
|
|
|
+ // getDetlList({ id: this.$route.query.id })
|
|
|
+ // .then((res) => {
|
|
|
+ // this.list = res.data;
|
|
|
+ // this.list.forEach((i) => {
|
|
|
+ // i.rejtRea = i.rejtRea || "";
|
|
|
+ // if (i.isUpDown === "1") {
|
|
|
+ // i.rejtRea = "下架";
|
|
|
+ // i.flag = 1;
|
|
|
+ // } else if (i.rejtRea) {
|
|
|
+ // i.flag = 1;
|
|
|
+ // }
|
|
|
+ // i.essdrugType = this.essdrugOptions[i.essdrugType * 1];
|
|
|
+ // });
|
|
|
+ // this.listLoading = false;
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // this.listLoading = false;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ getData() {
|
|
|
+ this.listLoading = true;
|
|
|
+ getDetlList({ id: this.$route.query.id })
|
|
|
+ .then(res => {
|
|
|
+ this.list = res.data;
|
|
|
+ this.list.forEach(i => {
|
|
|
+ if (i.rejtRea) {
|
|
|
+ i.flag = 1;
|
|
|
+ }
|
|
|
+ i.essdrugType = this.essdrugOptions[i.essdrugType * 1];
|
|
|
+ });
|
|
|
+ this.listLoading = false;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.listLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 选择医院客户
|
|
|
+ handleSelect(index, row) {
|
|
|
+ this.listindex = index;
|
|
|
+ this.dialogHosp = true;
|
|
|
+ this.getHopData();
|
|
|
+ },
|
|
|
+ getHopData() {
|
|
|
+ getSplerCustomerList({}).then(res => {
|
|
|
+ this.tableData = res.data;
|
|
|
+ console.log(res.data, " this.tableData");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 选择
|
|
|
+ handleRow(row) {
|
|
|
+ // customerName
|
|
|
+ this.listForm.zdCustomerId = row.customerId;
|
|
|
+ this.listForm.zdCustomerName = row.customerName;
|
|
|
+ this.dialogHosp = false;
|
|
|
+ },
|
|
|
+ // 是否驳回
|
|
|
+ handleSwitch(index, row) {
|
|
|
+ // if (row.flag === 0) {
|
|
|
+ // row.rejtRea = "";
|
|
|
+ // } else {
|
|
|
+ // if (!row.rejtRea && row.isUpDown == "1") {
|
|
|
+ // row.rejtRea = "下架";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (row.flag == 1) {
|
|
|
+ row.rejtRea = "";
|
|
|
+ this.returnInfo = false;
|
|
|
+ } else {
|
|
|
+ this.returnInfo = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 受理
|
|
|
+ handleAccept() {
|
|
|
+ this.list.forEach(e => {
|
|
|
+ if (e.flag == 1 && !e.rejtRea) {
|
|
|
+ this.$message({
|
|
|
+ message: "选择是否驳回后请填写驳回原因",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ throw new Error("选择是否驳回后请填写驳回原因");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$confirm("确认受理", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let data = this.list.filter(i => {
|
|
|
+ if (i.flag == 1) {
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let data2 = this.list;
|
|
|
+ // let data2 = data.map((i) => {
|
|
|
+ // return { id: i.id, rejtRea: i.rejtRea };
|
|
|
+ // });
|
|
|
+ let data3 = {
|
|
|
+ id: this.$route.query.id,
|
|
|
+ zdCustomerId: this.listForm.zdCustomerId,
|
|
|
+ zdCustomerName: this.listForm.zdCustomerName,
|
|
|
+ rejtList: data2
|
|
|
+ // zdData:zdData,
|
|
|
+ };
|
|
|
+ this.aaLoad = true;
|
|
|
+ acpOrd(data3)
|
|
|
+ .then(res => {
|
|
|
+ this.aaLoad = false;
|
|
|
+ this.$message({
|
|
|
+ message: "已受理",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.$router.push({
|
|
|
+ name: "purOrderAccept",
|
|
|
+ params: {
|
|
|
+ hospId: this.$route.query.hospId,
|
|
|
+ current: this.$route.query.current
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.aaLoad = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 对码
|
|
|
+ //搜索供应商列表
|
|
|
+ searchSup() {
|
|
|
+ this.supLoading = true;
|
|
|
+ this.supQuery.hospId = this.hospId;
|
|
|
+ this.supQuery.drugListId = this.duiId;
|
|
|
+ QuerySplerDrugList(this.supQuery)
|
|
|
+ .then(res => {
|
|
|
+ this.form.splerData = res.data.records;
|
|
|
+ this.total = res.data.total;
|
|
|
+ this.supLoading = false;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.supLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ reset(type) {
|
|
|
+ // if (type === "drug") {
|
|
|
+ // this.$refs.listQuery.resetFields();
|
|
|
+ // this.getHospDrug();
|
|
|
+ // } else {
|
|
|
+ this.$refs.supQuery.resetFields();
|
|
|
+ this.supQuery = {};
|
|
|
+ this.searchSup();
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ // 对码弹窗获取供应商列表
|
|
|
+ handleDui(row) {
|
|
|
+ console.log(row, "选中药品");
|
|
|
+ this.dialogDui = true;
|
|
|
+ this.selectDrguData = [];
|
|
|
+ this.selectDrguData.push(row);
|
|
|
+ this.supQuery.splerDrugName = row.drugName;
|
|
|
+ this.duiId = row.drugListId;
|
|
|
+ this.supQuery.current = 1;
|
|
|
+ this.searchSup();
|
|
|
+ },
|
|
|
+ validateField(form, index) {
|
|
|
+ let result = true;
|
|
|
+ for (let item of this.$refs[form].fields) {
|
|
|
+ if (item.prop.split(".")[1] == index) {
|
|
|
+ this.$refs[form].validateField(item.prop, error => {
|
|
|
+ if (error != "") {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (!result) break;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ },
|
|
|
+ // 对码操作
|
|
|
+ handleClick(item, index) {
|
|
|
+ let DrugMatchObj = {
|
|
|
+ spdId: this.$route.query.spdId,
|
|
|
+ drugListId: this.selectDrguData[0].drugListId,
|
|
|
+ splerDrugListId: item.splerDrugListId,
|
|
|
+ conNum: parseInt(item.conNum),
|
|
|
+ conDen: parseInt(item.conDen)
|
|
|
+ };
|
|
|
+ if (!this.validateField("form", index)) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ DrugMatch(DrugMatchObj).then(res => {
|
|
|
+ if (res.success === true) {
|
|
|
+ this.dialogDui = false;
|
|
|
+ this.$message({
|
|
|
+ message: "对码成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getData();
|
|
|
+ } else {
|
|
|
+ this.$message.error("对码失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.el-form-item--small.el-form-item {
|
|
|
+ margin-bottom: 1px;
|
|
|
+}
|
|
|
+</style>
|