Procházet zdrojové kódy

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

黄梓星 před 2 roky
rodič
revize
1761f853db

+ 7 - 0
src/api/business/purchase/contract.js

@@ -86,6 +86,13 @@ export function CODE() {
   });
 }
 
+export function SUBMIT(data) {
+  return request({
+    url: `/pu/contract/submit/${data}`,
+    method: "GET",
+  });
+}
+
 const switchUrl = (prop) => {
   if (prop === "contractItemList") return "/pu/contract/item";
   if (prop === "contractClauseList") return "/pu/contract/clause";

+ 30 - 31
src/components/Pagination/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="{'hidden':hidden}" class="pagination-container">
+  <div :class="{ hidden: hidden }" class="pagination-container">
     <el-pagination
       :background="background"
       :current-page.sync="currentPage"
@@ -16,91 +16,90 @@
 </template>
 
 <script>
-import { scrollTo } from '@/utils/scroll-to'
+import { scrollTo } from "@/utils/scroll-to";
 
 export default {
-  name: 'Pagination',
+  name: "Pagination",
   props: {
     total: {
       required: true,
-      type: Number
+      type: Number,
     },
     page: {
       type: Number,
-      default: 1
+      default: 1,
     },
     limit: {
       type: Number,
-      default: 20
+      default: 20,
     },
     pageSizes: {
       type: Array,
       default() {
-        return [10, 20, 30, 50]
-      }
+        return [1, 10, 20, 30, 50];
+      },
     },
     // 移动端页码按钮的数量端默认值5
     pagerCount: {
       type: Number,
-      default: document.body.clientWidth < 992 ? 5 : 7
+      default: document.body.clientWidth < 992 ? 5 : 7,
     },
     layout: {
       type: String,
-      default: 'total, sizes, prev, pager, next, jumper'
+      default: "total, sizes, prev, pager, next, jumper",
     },
     background: {
       type: Boolean,
-      default: true
+      default: true,
     },
     autoScroll: {
       type: Boolean,
-      default: true
+      default: true,
     },
     hidden: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
   data() {
-    return {
-    };
+    return {};
   },
   computed: {
     currentPage: {
       get() {
-        return this.page
+        return this.page;
       },
       set(val) {
-        this.$emit('update:page', val)
-      }
+        this.$emit("update:page", val);
+      },
     },
     pageSize: {
       get() {
-        return this.limit
+        return this.limit;
       },
       set(val) {
-        this.$emit('update:limit', val)
-      }
-    }
+        this.$emit("update:limit", val);
+      },
+    },
   },
   methods: {
     handleSizeChange(val) {
       if (this.currentPage * val > this.total) {
-        this.currentPage = 1
+        this.currentPage = 1;
       }
-      this.$emit('pagination', { page: this.currentPage, limit: val })
+      this.$emit("pagination", { page: this.currentPage, limit: val });
       if (this.autoScroll) {
-        scrollTo(0, 800)
+        scrollTo(0, 800);
       }
     },
     handleCurrentChange(val) {
-      this.$emit('pagination', { page: val, limit: this.pageSize })
+      this.$emit("pagination", { page: val, limit: this.pageSize });
       if (this.autoScroll) {
-        scrollTo(0, 800)
+        scrollTo(0, 800);
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style scoped>

+ 12 - 2
src/views/purchase/apply/index.vue

@@ -50,8 +50,15 @@ export default {
           { pageNum, pageSize }
         );
         if (code === 200) {
-          this.tableData = rows;
+          this.tableData = rows.map((item, index) => ({
+            ...item,
+            $index: index + 1,
+          }));
           this.page.total = total;
+          this.page.pageNum = pageNum;
+          this.page.pageSize = pageSize;
+          console.log(this.page);
+          return rows[0];
         }
       } catch (err) {
         // catch
@@ -123,9 +130,10 @@ export default {
     },
     // 明 细
     async useSee(prop) {
-      const { id } = prop;
+      const { id, $index } = prop;
       const { open } = this.$refs.SeeModel;
       await open(id);
+      await this.useQuery(this.params, { pageSize: 1, pageNum: $index });
     },
     // 审 核
     async useSubmit(prop, done) {
@@ -265,6 +273,8 @@ export default {
         :selectable="setSelectable"
       >
       </el-table-column>
+      <el-table-column fixed width="55" align="center" type="index">
+      </el-table-column>
       <el-table-column
         v-for="(column, index) in tableColumns"
         :key="index"

+ 54 - 14
src/views/purchase/apply/see/index.vue

@@ -50,6 +50,42 @@ export default {
       this.visible = false;
     },
     //
+    async useQueryLast() {
+      const {
+        page: { pageNum },
+        params,
+        fetchList,
+      } = this.root;
+      const page = { pageNum: pageNum - 1, pageSize: 1 };
+      console.log("last", page);
+      if (page.pageNum < 1) {
+        return this.$notify.info({
+          message: "已经是第一页了~",
+          position: "bottom-left",
+        });
+      } else {
+        this.params = await fetchList(params, page);
+      }
+    },
+    //
+    async useQueryPrev() {
+      const {
+        page: { total, pageNum },
+        params,
+        fetchList,
+      } = this.root;
+      const page = { pageNum: pageNum + 1, pageSize: 1 };
+      console.log("prev", page);
+      if (page.pageNum > total) {
+        return this.$notify.info({
+          message: "大海是有深度的~",
+          position: "bottom-left",
+        });
+      } else {
+        this.params = await fetchList(params, page);
+      }
+    },
+    //
     async useDelete(prop) {
       await this.root
         .useDelete(prop)
@@ -83,12 +119,23 @@ export default {
     <template slot="title">
       <span>{{ title }}</span>
       <span>
-        <el-tooltip
-          class="item"
-          effect="dark"
-          content="删 除"
-          placement="bottom-end"
-        >
+        <el-tooltip effect="dark" content="上一页" placement="bottom-end">
+          <el-button
+            :size="size"
+            circle
+            icon="el-icon-top"
+            @click="useQueryLast"
+          ></el-button>
+        </el-tooltip>
+        <el-tooltip effect="dark" content="下一页" placement="bottom-end">
+          <el-button
+            :size="size"
+            circle
+            icon="el-icon-bottom"
+            @click="useQueryPrev"
+          ></el-button>
+        </el-tooltip>
+        <el-tooltip effect="dark" content="删 除" placement="bottom-end">
           <el-button
             :size="size"
             circle
@@ -96,12 +143,7 @@ export default {
             @click="useDelete([params])"
           ></el-button>
         </el-tooltip>
-        <el-tooltip
-          class="item"
-          effect="dark"
-          content="复 制"
-          placement="bottom-end"
-        >
+        <el-tooltip effect="dark" content="复 制" placement="bottom-end">
           <el-button
             :size="size"
             circle
@@ -111,7 +153,6 @@ export default {
         </el-tooltip>
         <el-tooltip
           v-if="root.hasPowerEdit([params])"
-          class="item"
           effect="dark"
           content="编 辑"
           placement="bottom-end"
@@ -125,7 +166,6 @@ export default {
         </el-tooltip>
         <el-tooltip
           v-if="root.hasPowerSubmit([params])"
-          class="item"
           effect="dark"
           content="审 核"
           placement="bottom-end"

+ 6 - 0
src/views/purchase/contract/column.js

@@ -206,4 +206,10 @@ export const FormColumns = [
 
 export const SearchColumns = [
   { key: "contractName", title: "合同名称", inputType: "Input" },
+  {
+    key: "pigeonhole",
+    title: "是否归档",
+    inputType: "Select",
+    referName: "sys_yes_no",
+  },
 ];

+ 45 - 4
src/views/purchase/contract/index.vue

@@ -16,6 +16,7 @@ export default {
     TerminationModel: () => import("./termination/index.vue"),
     PigeonholeModel: () => import("./pigeonhole/index.vue"),
     AlterationModel: () => import("./alteration/index.vue"),
+    SubmitModel: () => import("./submit/index.vue"),
   },
   data() {
     return {
@@ -167,6 +168,19 @@ export default {
       const { open } = this.$refs.RecordModel;
       await open();
     },
+    // 提交OA
+    async useSubmit(prop) {
+      const [{ id }] = prop;
+      const { open } = this.$refs.SubmitModel;
+      await open(id);
+    },
+    hasPowerSubmit(prop) {
+      if (prop.length === 1) {
+        return true;
+      } else {
+        return false;
+      }
+    },
   },
 };
 </script>
@@ -183,14 +197,15 @@ export default {
     :body-style="{ padding: 0 }"
   >
     <see-model ref="SeeModel"></see-model>
-    <add-model
-      ref="AddModel"
-      @success="useReset"
-    ></add-model>
+    <add-model ref="AddModel" @success="useReset"></add-model>
     <record-model ref="RecordModel" @success="useReset"></record-model>
     <edit-model ref="EditModel" @success="useQuery(params, page)"></edit-model>
     <export-model ref="ExportModel"></export-model>
     <import-model ref="ImportModel"></import-model>
+    <submit-model
+      ref="SubmitModel"
+      @success="useQuery(params, page)"
+    ></submit-model>
     <delete-model
       ref="DeleteModel"
       @success="useQuery(params, page)"
@@ -223,10 +238,29 @@ export default {
         >
           <el-form-item :prop="column.key" :label="column.title">
             <el-input
+              v-if="column.inputType === 'Input'"
               v-model="params[column.key]"
               :placeholder="column.placeholder"
               @keyup.enter.native="useQuery(params, page)"
             ></el-input>
+            <el-select
+              v-if="column.inputType === 'Select'"
+              v-model="params[column.key]"
+              :disabled="column.disabled"
+              :clearable="column.clearable"
+              :placeholder="column.placeholder"
+              style="width: 100%"
+              @change="useQuery(params, page)"
+              @keyup.enter.native="useQuery(params, page)"
+            >
+              <el-option
+                v-for="item in dict.type[column.referName]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
           </el-form-item>
         </el-col>
       </el-row>
@@ -242,6 +276,13 @@ export default {
         导 出
       </el-button>
       <el-button
+        :size="size"
+        v-show="hasPowerSubmit(selectData)"
+        @click="useSubmit(selectData)"
+      >
+        提交OA
+      </el-button>
+      <el-button
         v-show="hasPowerDelete(selectData)"
         :size="size"
         @click="useDelete(selectData)"

+ 540 - 0
src/views/purchase/contract/see/column.js

@@ -0,0 +1,540 @@
+export const FormColumns = [
+  {
+    key: "puOrgName",
+    title: "采购组织",
+    inputType: "PopoverSelect",
+    referName: "ORG_PARAM",
+    dataMapping: {
+      puOrg: "code",
+      puOrgName: "name",
+    },
+    require: true,
+  },
+  { key: "code", title: "合同编码", inputType: "Input" },
+  {
+    key: "lastPuMoney",
+    title: "上年度采购额",
+    inputType: "Input",
+    require: true,
+  },
+  {
+    key: "buyerName",
+    title: "采购员",
+    inputType: "PopoverSelect",
+    referName: "CONTACTS_PARAM",
+    dataMapping: {
+      buyer: "code",
+      buyerName: "name",
+      puDept: "deptId",
+      puDeptName: "deptName",
+    },
+    require: true,
+  },
+  {
+    key: "supplierName",
+    title: "供应商",
+    inputType: "PopoverSelect",
+    referName: "SUPPLIER_PARAM",
+    dataMapping: {
+      supplier: "code",
+      supplierName: "name",
+    },
+    require: true,
+  },
+  {
+    key: "contractType",
+    title: "合同类型",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_contract_type",
+  },
+  {
+    key: "puMoneyYear",
+    title: "本年度采购额",
+    inputType: "InputNumber",
+    require: true,
+  },
+  {
+    key: "puDeptName",
+    title: "采购部门",
+    inputType: "PopoverSelect",
+    referName: "DEPT_PARAM",
+    dataMapping: {
+      puDept: "code",
+      puDeptName: "name",
+    },
+    require: true,
+  },
+  {
+    key: "supplierTier",
+    title: "供应商层级",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_supplier_tier",
+  },
+  { key: "contractName", title: "合同名称", inputType: "Input", require: true },
+  {
+    key: "grossRateAverage",
+    title: "平均毛利率",
+    inputType: "Input",
+    require: true,
+  },
+  {
+    key: "approveFlow",
+    title: "审批流程",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_approve_flow",
+  },
+  {
+    key: "consumableClass",
+    title: "耗材类别",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_consumable_class",
+  },
+  {
+    key: "effectiveDate",
+    title: "合同生效日期",
+    inputType: "DatePicker",
+    require: true,
+    valueFormat: "yyyy-MM-dd",
+  },
+  {
+    key: "brandGrossRate",
+    title: "同类品牌及毛利率",
+    inputType: "Input",
+    require: true,
+  },
+  {
+    key: "contractFormat",
+    title: "合同格式",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_contract_format",
+  },
+  {
+    key: "productName",
+    title: "产品类别&名称",
+    inputType: "Input",
+    require: true,
+  },
+  {
+    key: "endDate",
+    title: "合同终止日期",
+    inputType: "DatePicker",
+    require: true,
+    valueFormat: "yyyy-MM-dd",
+  },
+  {
+    key: "invoiceTax",
+    title: "发票税率",
+    inputType: "PopoverSelect",
+    referName: "TAX_RATE_PARAM",
+    dataMapping: {
+      invoiceTax: "ntaxrate",
+    },
+    require: true,
+  },
+  {
+    key: "emergencyDegree",
+    title: "紧急程度",
+    inputType: "Select",
+    require: true,
+    referName: "puarchase_contract_emergency_degree",
+  },
+  { key: "project", title: "项目医院", inputType: "Input", require: true },
+  {
+    key: "signDate",
+    title: "合同签订日期",
+    inputType: "DatePicker",
+    require: true,
+    valueFormat: "yyyy-MM-dd",
+  },
+  {
+    key: "deliveryType",
+    title: "交货方式",
+    inputType: "Select",
+    referName: "puarchase_contract_delivery_type",
+  },
+  {
+    key: "source",
+    title: "合同来源",
+    inputType: "Input",
+    value: "自制",
+    disabled: true,
+  },
+  {
+    key: "contractPartycName",
+    title: "合同丙方",
+    inputType: "PopoverSelect",
+    referName: "SUPPLIER_PARAM",
+    dataMapping: {
+      contractPartyc: "code",
+      contractPartycName: "name",
+    },
+  },
+  {
+    key: "guaranteePeriodEnd",
+    title: "质保期限",
+    inputType: "Input",
+    require: true,
+  },
+  {
+    key: "freightMethods",
+    title: "运费承担方式",
+    inputType: "Select",
+    referName: "puarchase_contract_freight_methods",
+  },
+  {
+    key: "signDate",
+    title: "合同创建时间",
+    inputType: "DatePicker",
+    disabled: true,
+  },
+  {
+    key: "isTarget",
+    title: "是否有指标",
+    inputType: "Select",
+    require: true,
+    referName: "sys_yes_no",
+  },
+  {
+    key: "contractTarget",
+    title: "合同指标",
+    inputType: "Input",
+    require: true,
+    placeholder: '当【是否有指标】="有"时,必填',
+  },
+  {
+    key: "exemptionPostageCondtion",
+    title: "包邮条件",
+    inputType: "Input",
+    placeholder:
+      "当运费承担方式为供应商有条件承担时,该字段必填,填写要求,写明什么条件下供应商承担全部,什么条件下我方承担,什么条件下分别承担",
+    span: 12,
+  },
+  {
+    key: "isRebate",
+    title: "是否有返利",
+    inputType: "Select",
+    require: true,
+    referName: "sys_yes_no",
+  },
+  {
+    key: "rebatePolicy",
+    title: "返利政策",
+    inputType: "Input",
+    placeholder: '当【是否有返利】="有"时,必填',
+    span: 18,
+  },
+  { key: "externalContract", title: "外部合同号", inputType: "Input" },
+  {
+    key: "rollbackPolicy",
+    title: "退换货政策",
+    inputType: "Input",
+    require: true,
+  },
+  { key: "enquiryCode", title: "询价单号", inputType: "Input" },
+  {
+    key: "contractContent",
+    title: "合同主要内容",
+    inputType: "Textarea",
+    require: true,
+    span: 24,
+  },
+  { key: "refusalReasons", title: "拒绝理由", inputType: "Input", span: 24 },
+  {
+    key: "pigeonhole",
+    title: "是否归档",
+    inputType: "Select",
+    referName: "sys_yes_no",
+    disabled: true,
+  },
+  {
+    key: "pigeonholeFile",
+    title: "归档附件",
+    inputType: "Upload",
+    disabled: true,
+  },
+  {
+    key: "externalFile",
+    title: "对外附件",
+    inputType: "Upload",
+    span: 24,
+    fileType: ["pdf"],
+  },
+  {
+    key: "puFile",
+    title: "采购商盖章合同附件",
+    inputType: "Upload",
+    span: 24,
+    fileType: ["pdf"],
+  },
+  {
+    key: "supplierFile",
+    title: "供应商盖章合同附件",
+    inputType: "Upload",
+    span: 24,
+    fileType: ["pdf"],
+  },
+  { key: "projectCode", title: "项目编号", inputType: "Input" },
+  { key: "projectName", title: "项目名称", inputType: "Input" },
+  { key: "area", title: "区域", inputType: "Input" },
+  { key: "consigneePhone", title: "收货人联系方式", inputType: "Input" },
+  {
+    key: "paymentAgreement",
+    title: "付款协议",
+    inputType: "PopoverSelect",
+    referName: "PAYAGREEMENT_PARAM",
+    dataMapping: {
+      paymentAgreement: "code",
+      paymentAgreementName: "name",
+    },
+    require: true,
+  },
+  {
+    key: "taxPrice",
+    title: "价税合计",
+    inputType: "InputNumber",
+  },
+  {
+    key: "currencyName",
+    title: "币种",
+    inputType: "PopoverSelect",
+    referName: "CURRENCY_PARAM",
+    dataMapping: {
+      currency: "code",
+      currencyName: "name",
+    },
+    require: true,
+  },
+  { key: "guaranteePeriod", title: "质保期", inputType: "Input" },
+];
+
+export const TabColumns = [
+  {
+    title: "物料基本信息",
+    key: "contractItemList",
+    tableColumns: [
+      {
+        title: "物料名称",
+        key: "materialName",
+        inputType: "PopoverSelect",
+        width: 200,
+        referName: "MATERIAL_PARAM",
+        dataMapping: {
+          material: "code",
+          materialName: "name",
+          puUnit: "unitIdName",
+          registration: "registrationNo",
+          specification: "specification",
+          manufacturer: "manufacturerIdName",
+        },
+      },
+      { title: "物料编码", key: "material", width: 200 },
+      {
+        title: "规格",
+        key: "specification",
+        width: 200,
+      },
+      // {
+      //   title: "品牌",
+      //   key: "brand",
+      //   inputType: "PopoverSelect",
+      //   width: 200,
+      //   referName: "MATERIAL_PARAM",
+      //   dataMapping: {
+      //     material: "code",
+      //     materialName: "name",
+      //   },
+      // },
+      {
+        title: "生产厂家",
+        key: "manufacturer",
+        inputType: "Input",
+        width: 200,
+      },
+      {
+        title: "采购单位",
+        key: "puUnit",
+        inputType: "PopoverSelect",
+        width: 200,
+        referName: "UNIT_PARAM",
+        dataMapping: {
+          puUnit: "name",
+        },
+      },
+      {
+        title: "税率%",
+        key: "tax",
+        inputType: "PopoverSelect",
+        referName: "TAX_RATE_PARAM",
+        dataMapping: {
+          tax: "ntaxrate",
+        },
+        width: 200,
+      },
+      {
+        title: "采购数量",
+        key: "qty",
+        inputType: "InputNumber",
+        width: 200,
+      },
+      {
+        title: "含税单价",
+        key: "taxPrice",
+        inputType: "InputNumber",
+        width: 200,
+      },
+      {
+        title: "含税金额合计",
+        key: "taxMoney",
+        inputType: "ComputedInput",
+        width: 200,
+        computed: (prop) => {
+          const { qty, taxPrice } = prop;
+          const taxMoney = (qty * taxPrice).toFixed(8);
+          return taxMoney === "NaN" ? null : taxMoney;
+        },
+      },
+      {
+        title: "无税单价",
+        key: "taxFreePrice",
+        inputType: "ComputedInput",
+        width: 200,
+        computed: (prop) => {
+          const { tax, taxPrice } = prop;
+          const newTax = Number(tax) / 100;
+          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
+          return taxFreePrice === "NaN" ? null : taxFreePrice;
+        },
+      },
+      {
+        title: "无税金额合计",
+        key: "taxFreeMoney",
+        inputType: "ComputedInput",
+        width: 200,
+        computed: (prop) => {
+          const { qty, taxFreePrice } = prop;
+          const taxFreeMoney = (qty * taxFreePrice).toFixed(8);
+          return taxFreeMoney === "NaN" ? null : taxFreeMoney;
+        },
+      },
+      {
+        title: "注册证号及备案凭证号",
+        key: "registration",
+        inputType: "Input",
+        width: 200,
+      },
+      {
+        title: "收货客户",
+        key: "customerName",
+        inputType: "PopoverSelect",
+        width: 200,
+        referName: "CUSTOMER_PARAM",
+        dataMapping: {
+          customer: "code",
+          customerName: "name",
+        },
+      },
+    ],
+  },
+  {
+    title: "合同条款",
+    key: "contractClauseList",
+    tableColumns: [
+      { title: "条款编码", key: "code", inputType: "Input" },
+      { title: "条款名称", key: "name", inputType: "Input" },
+      { title: "条款内容", key: "content", inputType: "Input" },
+      { title: "变量序号", key: "variableRowno" },
+      { title: "变量内容", key: "variableContent", inputType: "Input" },
+    ],
+  },
+  {
+    title: "合同费用",
+    key: "contractExpenseList",
+    tableColumns: [
+      { title: "费用编码", key: "code", inputType: "Input" },
+      { title: "费用名称", key: "name", inputType: "Input" },
+      {
+        title: "费用金额",
+        key: "money",
+        inputType: "InputNumber",
+        width: 200,
+      },
+    ],
+  },
+  {
+    title: "付款协议信息",
+    key: "contractAgreementList",
+    tableColumns: [
+      {
+        title: "付款阶段",
+        key: "satge",
+        inputType: "InputNumber",
+        width: 200,
+      },
+      {
+        title: "付款起点",
+        key: "origin",
+        width: 200,
+        inputType: "Select",
+        referName: "puarchase_contract_origin",
+      },
+      { title: "账期天数", key: "paymetDays", inputType: "Input", width: 200 },
+      { title: "付款比例%", key: "ratio", inputType: "Input", width: 200 },
+      { title: "付款金额", key: "money", inputType: "Input", width: 200 },
+      {
+        title: "是否预付款",
+        key: "isAdvance",
+        width: 200,
+        inputType: "Select",
+        referName: "sys_yes_no",
+      },
+      {
+        title: "是否质保金",
+        key: "isQuality",
+        width: 200,
+        inputType: "Select",
+        referName: "sys_yes_no",
+      },
+      {
+        title: "结算方式",
+        key: "paymentMeans",
+        inputType: "PopoverSelect",
+        width: 200,
+        referName: "BALATYPE_PARAM",
+        dataMapping: {
+          paymentMeans: "name",
+        },
+      },
+      {
+        title: "需进度确认",
+        key: "schedule",
+        inputType: "Select",
+        referName: "sys_yes_no",
+        width: 200,
+      },
+    ],
+  },
+  {
+    title: "合同执行组织范围",
+    key: "contractApplyOrgList",
+    tableColumns: [
+      {
+        title: "组织名称",
+        key: "orgName",
+        inputType: "PopoverSelect",
+        referName: "ORG_PARAM",
+        dataMapping: {
+          org: "code",
+          orgName: "name",
+        },
+      },
+      { title: "组织编码", key: "org" },
+    ],
+  },
+];
+
+export default { FormColumns, TabColumns };

+ 14 - 1
src/views/purchase/contract/see/index.vue

@@ -1,5 +1,5 @@
 <script>
-import Column from "../add/column";
+import Column from "./column";
 import useData from "../hooks/data";
 import useDicts from "../hooks/dicts";
 import { ITEM } from "@/api/business/purchase/contract";
@@ -136,6 +136,19 @@ export default {
             @click="root.usePigeonhole([params])"
           ></el-button>
         </el-tooltip>
+        <el-tooltip
+          v-if="root.hasPowerSubmit([params])"
+          effect="dark"
+          content="提交OA"
+          placement="bottom-end"
+        >
+          <el-button
+            :size="size"
+            circle
+            icon="el-icon-heavy-rain"
+            @click="root.useSubmit([params])"
+          ></el-button>
+        </el-tooltip>
         <el-button
           :size="size"
           circle

+ 46 - 0
src/views/purchase/contract/submit/index.vue

@@ -0,0 +1,46 @@
+<script>
+import { SUBMIT } from "@/api/business/purchase/contract";
+
+export default {
+  name: "DeleteDialog",
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    //
+    open(prop) {
+      return new Promise((resolve, reject) => {
+        this.$confirm("是否提交数据项至OA系统?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info",
+        })
+          .then(async () => {
+            try {
+              // try
+              const { msg, code } = await SUBMIT(prop);
+              if (code === 200) {
+                resolve(true);
+                this.$emit("success");
+                this.$notify.success(msg);
+              }
+            } catch (err) {
+              // catch
+              reject(false);
+              console.error(err);
+            } finally {
+              // finally
+            }
+          })
+          .catch(() => reject(false));
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template></template>

+ 16 - 7
src/views/purchase/task/first-direct/column.js

@@ -11,15 +11,24 @@ export const TableColumns = [
     inputType: "Select",
     referName: "sys_price_type",
   },
-  {
-    key: "isDistribution",
-    title: "配送价",
-    inputType: "Select",
-    referName: "sys_yes_no",
-  },
+  // {
+  //   key: "isDistribution",
+  //   title: "配送价",
+  //   inputType: "Select",
+  //   referName: "sys_yes_no",
+  // },
   { key: "effectiveDate", title: "价格生效日期" },
   { key: "endDate", title: "价格失效日期" },
-  { key: "tax", title: "税率" },
+  {
+    key: "tax",
+    title: "税率",
+    inputType: "ComputedInput",
+    width: 200,
+    computed: (prop) => {
+      const { tax } = prop;
+      return tax.toFixed(8) + "%";
+    },
+  },
   { key: "taxFreePrice", title: "无税单价" },
   { key: "taxPrice", title: "主含税单价" },
   {

+ 8 - 0
src/views/purchase/task/first-direct/index.vue

@@ -167,6 +167,14 @@ export default {
               type="textarea"
               style="width: 90%"
             ></el-input>
+            <dr-computed-input
+              v-else-if="cItem.inputType === 'ComputedInput'"
+              v-model="scope.row[cItem.key]"
+              :source="scope.row"
+              :computed="cItem.computed"
+              :placeholder="cItem.placeholder"
+              style="width: 100%"
+            ></dr-computed-input>
             <dict-tag
               v-else-if="cItem.inputType === 'Select'"
               :size="size"