Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev' into dev

001295 1 жил өмнө
parent
commit
c8d3dbd74f

+ 9 - 0
src/views/material/basicFile/wei-hu-lei-bie/components/api/index.js

@@ -0,0 +1,9 @@
+import request from "@/utils/request";
+
+export function REFER(data) {
+  return request({
+    url: "/refer/query",
+    method: "POST",
+    data: data,
+  });
+}

+ 288 - 0
src/views/material/basicFile/wei-hu-lei-bie/components/index.vue

@@ -0,0 +1,288 @@
+<script>
+import { REFER } from "./api/index";
+
+export default {
+  name: "PopoverTreeSelect",
+  props: {
+    // v-model
+    value: {
+      type: [Array, String],
+      require: true,
+    },
+    // 参照类型 ,对应后端
+    referName: {
+      type: String,
+      require: true,
+    },
+    // 作为 value 唯一标识的键名,绑定值
+    valueKey: {
+      type: String,
+      dafault: () => {
+        return "code";
+      },
+    },
+    // 默认查询参数
+    queryParams: {
+      type: Function,
+      default: () => {},
+    },
+    // 需映射源数据
+    source: {
+      type: Object,
+      default: () => ({}),
+    },
+    // 参照内外映射
+    dataMapping: {
+      type: Object,
+      default: () => ({}),
+    },
+    defaultProps: {
+      type: Object,
+      default: () => {
+        return {
+          label: "name",
+          children: "children",
+        };
+      },
+    },
+    onlyFinal: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  components: {},
+  data() {
+    return {
+      size: "mini",
+      width: "50%",
+      visible: false,
+      loading: false,
+      model: {
+        search: "",
+        isPage: false,
+      },
+      isSure: true,
+      data: [],
+      selectData: [],
+      // defaultProps: {
+      //   label: "name",
+      //   children: "children",
+      // },
+    };
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+  },
+  watch: {
+    innerValue: {
+      handler: function (newValue) {
+        if (!newValue) {
+          const {
+            $props: { source, dataMapping },
+          } = this;
+          for (let key in dataMapping) {
+            source[key] = undefined;
+          }
+          this.$emit("update:source", source);
+        }
+      },
+    },
+    // "model.search": {
+    //   handler: function (newValue) {
+    //     this.$refs.tree.filter(newValue);
+    //   },
+    // },
+  },
+  methods: {
+    // open dialog
+    async open() {
+      let { disabled } = this.$attrs;
+      if (!disabled) {
+        this.visible = true;
+        await this.useReset();
+      }
+    },
+    // hide dialog
+    async hide() {
+      this.visible = false;
+    },
+    // fetch list
+    async fetchList(prop) {
+      try {
+        this.loading = true;
+        const { referName: type, source, queryParams } = this.$props;
+        const { code, rows } = await REFER({
+          ...prop,
+          ...queryParams(source),
+          type: type,
+        });
+        if (code === 200) {
+          this.data = rows;
+        }
+      } catch (err) {
+        // catch
+        console.error(err);
+      } finally {
+        // finally
+        this.loading = false;
+      }
+    },
+    // reset list
+    async useReset() {
+      this.data = [];
+      this.model.search = null;
+      await this.fetchList(this.model);
+    },
+    // query list
+    async useQuery(value) {
+      // await this.$refs.tree.filter(value);
+      await this.fetchList(this.model);
+    },
+    // auto
+    async useAutocomplete(prop, cb) {
+      if (prop) {
+        this.model.search = prop;
+        await this.fetchList(this.model);
+        await cb(this.data);
+      } else {
+        cb([]);
+      }
+    },
+    // select
+    useSelect(prop) {
+      if (this.$props.onlyFinal) {
+        this.isSure = prop.children ? false : true;
+      }
+      this.selectData = [prop];
+    },
+    // filter
+    useTreeFilter(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
+    // confirm
+    useConfirm(prop) {
+      if (this.isSure) {
+        this.hide();
+        const {
+          $props: { source, valueKey, dataMapping },
+        } = this;
+        for (let key in dataMapping) {
+          source[key] = prop[0][dataMapping[key]];
+        }
+        this.innerValue = prop[0][valueKey];
+        console.log(valueKey, "valueKey");
+        console.log(prop[0][valueKey], "prop[0][valueKey]");
+        console.log(this.innerValue, "innerValue");
+        console.log(source, "source");
+        this.$emit("update:source", source);
+        this.$emit("change", prop, this.$props);
+      } else {
+        this.$message.warning({
+          message: "请选择最末级节点",
+        });
+      }
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <div class="popover-tree-select">
+    <el-autocomplete
+      v-show="false"
+      v-bind="$attrs"
+      v-model="innerValue"
+      :value-key="valueKey"
+      :fetch-suggestions="useAutocomplete"
+      @select="useConfirm"
+      style="width: 100%"
+    >
+      <i class="el-icon-search" slot="suffix" @click="open"> </i>
+      <template slot-scope="{ item }">
+        <p
+          style="
+            text-overflow: ellipsis;
+            overflow: hidden;
+            line-height: 15px;
+            margin: 5px 0;
+          "
+        >
+          {{ item.name }}
+        </p>
+        <p
+          style="
+            font-size: 12px;
+            color: #b4b4b4;
+            line-height: 15px;
+            margin: 5px 0;
+          "
+        >
+          {{ item.code }}
+        </p>
+      </template>
+    </el-autocomplete>
+
+    <el-button type="text" :size="$attrs.size" @click="open"> 增行</el-button>
+
+    <el-dialog
+      :width="width"
+      :show-close="false"
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      append-to-body
+      style="padding: 10px"
+    >
+      <div slot="footer">
+        <el-button
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useConfirm(selectData)"
+          >确 认</el-button
+        >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+      </div>
+      <el-form
+        v-loading="loading"
+        :size="size"
+        :inline="true"
+        :model="model"
+        @submit.native.prevent
+      >
+        <el-form-item prop="search">
+          <el-input v-model="model.search" @change="useQuery"> </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button icon="el-icon-refresh" @click="useReset"></el-button>
+        </el-form-item>
+        <div style="height: 400px; overflow: auto">
+          <el-tree
+            v-loading="loading"
+            :data="data"
+            :props="defaultProps"
+            :filter-node-method="useTreeFilter"
+            ref="tree"
+            accordion
+            node-key="id"
+            @node-click="useSelect"
+          >
+          </el-tree>
+        </div>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<style scoped></style>

+ 24 - 4
src/views/material/basicFile/wei-hu-lei-bie/index.vue

@@ -11,8 +11,9 @@ export default {
   },
   components: {
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
-    ElPopoverTreeSelect: () =>
-      import("@/components/popover-tree-select/index.vue"),
+    // ElPopoverTreeSelect: () =>
+    //   import("@/components/popover-tree-select/index.vue"),
+    TypeButton: () => import("./components/index.vue"),
   },
   data() {
     const materialType = this.$init.params(Columns);
@@ -104,6 +105,7 @@ export default {
     },
     // 增行
     useRowAdd() {
+      console.log(this.$refs, "this.$refs");
       let { open } = this.$refs.materialTypeTree;
       open();
     },
@@ -169,7 +171,25 @@ export default {
       >
         <ux-table-column fixed="right" title="操作" width="80" align="center">
           <template slot="header" slot-scope="scope">
-            <el-button type="text" :size="$attrs.size" @click="useRowAdd">
+            <TypeButton
+              :size="$attrs.size"
+              v-model="materialType.drugName"
+              :source.sync="materialType"
+              referName="MEDICINE_DRUG"
+              valueKey="name"
+              :dataMapping="{
+                drugCode: 'code',
+                drugId: 'id',
+              }"
+              :defaultProps="{
+                label: function (data, node) {
+                  return data.code + '' + data.name;
+                },
+                children: 'children',
+              }"
+              @change="changeMaterialType"
+            ></TypeButton>
+            <!-- <el-button type="text" :size="$attrs.size" @click="useRowAdd">
               增行
               <el-popover-tree-select
                 ref="materialTypeTree"
@@ -191,7 +211,7 @@ export default {
                 }"
                 @change="changeMaterialType"
               ></el-popover-tree-select>
-            </el-button>
+            </el-button> -->
           </template>
           <template slot-scope="scope">
             <el-button

+ 1 - 0
src/views/purchase/DemandSummary/add.vue

@@ -169,6 +169,7 @@
         <!-- <el-table-column show-overflow-tooltip label="处理需求人员" align="center" prop="processPersonal"/> -->
         <el-table-column show-overflow-tooltip label="处理确认人" align="center" prop="affirmerName" width="100"/>
         <el-table-column show-overflow-tooltip label="处理确认时间" align="center" prop="affirmerTime" width="120"/>
+        <el-table-column show-overflow-tooltip label="处理审批时间" align="center" prop="puManagerApproverDate" width="120"/>
         <!-- <el-table-column show-overflow-tooltip label="转请购时间" align="center" prop="code"/>
         <el-table-column show-overflow-tooltip label="转请购人员" align="center" prop="code"/> -->
         <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="100" :formatter="priceClass"/>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 926 - 258
src/views/purchase/PurchaseDemandList/add.vue


+ 133 - 95
src/views/purchase/workSpace/columns.js

@@ -52,10 +52,43 @@ const ALLOT_RULE = [
 const MATERIAL_APPLY_RULE = [
   { prop: 'name', label: '物料名称', },
   { prop: 'code', label: '物料编码', },
-  { prop: 'version', label: '版本号', },
-  { prop: 'orgName', label: '所属组织', },
   { prop: 'specification', label: '规格' },
+  { prop: 'model', label: '型号', },
+  { prop: 'unitName', label: '计量单位', },
+  { prop: 'manufacturerName', label: '生产厂家/代理人', },
+  { prop: 'registrant', label: '注册人/上市许可持有人', },
+  { prop: 'productionPermit', label: '生产许可证', },
+  {
+    prop: 'storageCondition',
+    label: '存储条件',
+    attr: {
+      is: "el-dict-tag",
+      dictName: "sys_storage_condition",
+    },
+  },
+  {
+    prop: 'transportationCondition',
+    label: '运输条件',
+    attr: {
+      is: "el-dict-tag",
+      dictName: "sys_conditions_carriage",
+    },
+  },
+  { prop: 'originPlaceName', label: '产地', },
+  { prop: 'serviceLife', label: '使用期限/次数', },
+  { prop: 'brand', label: '品牌', },
   { prop: 'classifyName', label: '四级分类', },
+  { prop: 'packExplain', label: '包装说明', },
+  { prop: 'deliveryPeriod', label: '交货周期', },
+  { prop: 'minOrderQty', label: '最小起订量', },
+  { prop: 'minPackQty', label: '最小包装量', },
+  { prop: 'minBatchQty', label: '最小批量', },
+  { prop: 'diCode', label: 'DI码', },
+  { prop: 'healthCode', label: '医保代码', },
+  { prop: 'manufacturersMaterialCode', label: '厂家物料编码', },
+  { prop: 'purchasingOrganizationName', label: '默认采购组织', },
+  { prop: 'puPersonnelName', label: '负责采购员', },
+  { prop: 'version', label: '版本号', },
   {
     prop: 'isMedicine',
     label: '医药物料',
@@ -64,9 +97,6 @@ const MATERIAL_APPLY_RULE = [
       dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'failCause', label: '同步失败原因', },
-  { prop: 'model', label: '型号', },
-  { prop: 'packExplain', label: '包装说明', },
   {
     prop: 'serialNoManager',
     label: '序列号管理',
@@ -75,9 +105,6 @@ const MATERIAL_APPLY_RULE = [
       dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'barCode', label: '条形码', },
-  { prop: 'unitName', label: '计量单位', },
-  { prop: 'deliveryPeriod', label: '交货周期', },
   {
     prop: 'isInventoryStatus',
     label: '批号及库存状态管理',
@@ -86,9 +113,6 @@ const MATERIAL_APPLY_RULE = [
       dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'height', label: '高度', },
-  { prop: 'manufacturerName', label: '生产厂家/代理人', },
-  { prop: 'minOrderQty', label: '最小起订量', },
   {
     prop: 'expiryDateManagerment',
     label: '效期管理',
@@ -97,9 +121,6 @@ const MATERIAL_APPLY_RULE = [
       dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'width', label: '宽度', },
-  { prop: 'registrant', label: '注册人/上市许可持有人', },
-  { prop: 'minPackQty', label: '最小包装量', },
   {
     prop: 'expiryUnitId',
     label: '效期单位',
@@ -108,20 +129,7 @@ const MATERIAL_APPLY_RULE = [
       dictName: "period_unit",
     },
   },
-  { prop: 'length', label: '长度', },
-  { prop: 'productionPermit', label: '生产许可证', },
-  { prop: 'minBatchQty', label: '最小批量', },
   { prop: 'usefulLife', label: '有效期', },
-  { prop: 'oneClass', label: '一级分类', },
-  {
-    prop: 'storageCondition',
-    label: '存储条件',
-    attr: {
-      is: "el-dict-tag",
-      dictName: "sys_storage_condition",
-    },
-  },
-  { prop: 'diCode', label: 'DI码', },
   {
     prop: 'usefulLifeUnitId',
     label: '有效期至单位',
@@ -130,16 +138,6 @@ const MATERIAL_APPLY_RULE = [
       dictName: "expiry_date",
     },
   },
-  { prop: 'twoClass', label: '二级分类', },
-  {
-    prop: 'transportationCondition',
-    label: '运输条件',
-    attr: {
-      is: "el-dict-tag",
-      dictName: "sys_conditions_carriage",
-    },
-  },
-  { prop: 'healthCode', label: '医保代码', },
   {
     prop: 'nearOnsetManagerment',
     label: '近效期管理',
@@ -148,26 +146,62 @@ const MATERIAL_APPLY_RULE = [
       dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'threeClass', label: '三级分类', },
-  { prop: 'originPlaceName', label: '产地', },
-  { prop: 'manufacturersMaterialCode', label: '厂家物料编码', },
   { prop: 'recentWarningPeriod', label: '近效期预警天数', },
+  { prop: 'materialRateName', label: '物料税类', },
+  { prop: 'failCause', label: '同步失败原因', },
   {
-    prop: 'isEnable',
-    label: '启用状态',
+    prop: 'isDrug',
+    label: '是否药品', 
     attr: {
       is: "el-dict-tag",
-      dictName: "material_enable",
+      dictName: "sys_number_yes_no",
     },
   },
-  { prop: 'serviceLife', label: '使用期限/次数', },
-  { prop: 'purchasingOrganizationName', label: '默认采购组织', },
-  { prop: 'materialRateName', label: '物料税类', },
-  { prop: 'remark', label: '备注', },
-  { prop: 'brand', label: '品牌', },
-  { prop: 'puPersonnelName', label: '负责采购员', },
-  { prop: 'proposerName', label: '物料申请人', },
-  { prop: 'serviceClass', label: '服务类', },
+  { prop: 'ratifyBatchNo', label: '批准文号', },
+  { prop: 'registrationNo', label: '注册证号/备案凭证编号', },
+  { prop: 'dosageFrom', label: '剂型', },
+  { prop: 'medicalInstruments',
+    label: '管理类别', 
+    attr: {
+      is: "el-dict-tag",
+      dictName: "medical_instruments",
+    },  
+  },
+  { prop: 'oriRegistrationNo', label: '旧注册证号', },
+  { prop: 'curingType',
+    label: '养护类型',
+    attr: {
+      is: "el-dict-tag",
+      dictName: "curing_type",
+    },   
+  },
+  { prop: 'drugCode', label: '药品类别编码', },
+  { prop: 'drugName', label: '药品类别名称', },
+
+  // { prop: 'orgName', label: '所属组织', },
+  // { prop: 'barCode', label: '条形码', },
+  // { prop: 'height', label: '高度', },
+  // { prop: 'width', label: '宽度', },
+
+  // { prop: 'length', label: '长度', },
+  // { prop: 'oneClass', label: '一级分类', },
+
+
+  // { prop: 'twoClass', label: '二级分类', },
+
+
+  // { prop: 'threeClass', label: '三级分类', },
+  // {
+  //   prop: 'isEnable',
+  //   label: '启用状态',
+  //   attr: {
+  //     is: "el-dict-tag",
+  //     dictName: "material_enable",
+  //   },
+  // },
+  // { prop: 'remark', label: '备注', },
+  // { prop: 'proposerName', label: '物料申请人', },
+  // { prop: 'serviceClass', label: '服务类', },
 ];
 
 // 价格申报单
@@ -175,46 +209,14 @@ const PU_PRICE_APPLY_RULE = [
   { label: "物料编码", prop: "materialCode", width: 120 },
   { label: "物料名称", prop: "materialName" },
   { label: "规格", prop: "specification" },
+  { label: "型号", prop: "model" },
   { label: "生产厂家/代理人", prop: "manufacturerName" },
-  { label: "含税单价", prop: "taxPrice", width: 80 },
-  { label: "最近价格", prop: "recentlyPrice", width: 80 },
-  { label: "单价差", prop: "priceDiffer", width: 80 },
-  { label: "申请理由", prop: "explainStr" },
   { label: "客户", prop: "customerName" },
-  { label: "供应商名称1", prop: "supplierName1" },
-  { label: "单价1", prop: "unitPrice1", width: 70 },
-  { label: "供应商名称2", prop: "supplierName2" },
-  { label: "单价2", prop: "unitPrice2", width: 70 },
-  { label: "供应商名称3", prop: "supplierName3" },
-  { label: "单价3", prop: "unitPrice3", width: 70 },
-  { label: "型号", prop: "model" },
-  {
-    label: "价格类型",
-    prop: "priceType",
-    attr: {
-      is: "el-dict-tag",
-      dictName: "sys_price_type",
-    },
-  },
-  {
-    label: "配送价",
-    prop: "isDistributionPrice",
-    attr: {
-      is: "el-dict-tag",
-      dictName: "sys_number_yes_no",
-    },
-    // formatter: function (row, column, cellValue, index) {
-    //   return row.isDistributionPrice == "Y" ? "是" : "否";
-    // },
-  },
+  { label: "主单位", prop: "unitName" },
+  { label: "含税单价", prop: "taxPrice", width: 80 },
+  { label: "税率", prop: "tax" },
   { label: "价格有效期(起)", prop: "periodBegin" },
   { label: "价格有效期(止)", prop: "periodEnd" },
-  { label: "币种名称", prop: "currencyName" },
-  { label: "无税单价", prop: "price" },
-  { label: "采购换算率", prop: "conversionRate" },
-  { label: "采购单位名称", prop: "puUnitName" },
-  { label: "单位名称", prop: "unitName" },
-  { label: "调整类型", prop: "isPriceAdjustment" },
   {
     label: "首次报批",
     prop: "isApprovalFirst",
@@ -226,18 +228,56 @@ const PU_PRICE_APPLY_RULE = [
     //   return row.isApprovalFirst == "Y" ? "是" : "否";
     // },
   },
-  { label: "预计年采购量", prop: "yPurchaseQuantity" },
-  { label: "预计年影响量", prop: "yAffectedAmount" },
+  { label: "调整类型", prop: "isPriceAdjustment" },
+  { label: "最近价格", prop: "recentlyPrice", width: 80 },
+  { label: "单价差", prop: "priceDiffer", width: 80 },
   { label: "涨幅", prop: " increase" },
+  { label: "预计年采购量", prop: "yPurchaseQuantity" },
+  { label: "预计年影响金额", prop: "yAffectedAmount" },
+  {
+    label: "价格类型",
+    prop: "priceType",
+    attr: {
+      is: "el-dict-tag",
+      dictName: "sys_price_type",
+    },
+  },
+
+
+  { label: "申请理由", prop: "explainStr" },
+  // { label: "供应商名称1", prop: "supplierName1" },
+  // { label: "单价1", prop: "unitPrice1", width: 70 },
+  // { label: "供应商名称2", prop: "supplierName2" },
+  // { label: "单价2", prop: "unitPrice2", width: 70 },
+  // { label: "供应商名称3", prop: "supplierName3" },
+  // { label: "单价3", prop: "unitPrice3", width: 70 },
+  // {
+  //   label: "配送价",
+  //   prop: "isDistributionPrice",
+  //   attr: {
+  //     is: "el-dict-tag",
+  //     dictName: "sys_number_yes_no",
+  //   },
+  //   // formatter: function (row, column, cellValue, index) {
+  //   //   return row.isDistributionPrice == "Y" ? "是" : "否";
+  //   // },
+  // },
+  // { label: "币种名称", prop: "currencyName" },
+  // { label: "无税单价", prop: "price" },
+  // { label: "采购换算率", prop: "conversionRate" },
+  // { label: "采购单位名称", prop: "puUnitName" },
+  // { label: "单位名称", prop: "unitName" },
+  // { label: "预计年影响量", prop: "yAffectedAmount" },
 ];
 
 // 采购订单
 const PU_ORDER_RULE = [
-  { label: "收货客户", prop: "customerName" },
   { label: "物料编码", prop: "materialCode", width: 120 },
   { label: "物料名称", prop: "materialName" },
+  { label: "规格", prop: "specification" },
   { label: "生产厂家", prop: "manufacturerName" },
   // {label: '医药物料',  prop: 'isMedcine'},
+  { label: "单位", prop: "unitName" },
   { label: "数量", prop: "qty", width: 60 },
   { label: "含税单价", prop: "taxPrice", width: 80 },
   {
@@ -248,6 +288,8 @@ const PU_ORDER_RULE = [
       return row.money ? parseFloat(row.money).toFixed(2) : "0.00";
     },
   },
+  { label: "收货客户", prop: "customerName" },
+  { label: "税率", prop: "tax" },
   {
     label: "赠品",
     prop: "isGift",
@@ -260,12 +302,8 @@ const PU_ORDER_RULE = [
     //   return row.isGift == "Y" ? "是" : "否";
     // },
   },
-  { label: "折扣%", prop: "nitemdiscountrate", width: 70 },
   { label: "价格类型", prop: "priceType", width: 80 },
-
-  { label: "规格", prop: "specification" },
-  { label: "单位", prop: "unitName" },
-  { label: "税率", prop: "tax" },
+  { label: "折扣%", prop: "nitemdiscountrate", width: 70 },
   { label: "注册证号", prop: "registration" },
   { label: "需求单号", prop: "demandCode" },
 ];

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно