Explorar el Código

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

001295 hace 1 año
padre
commit
dadde5ff6e

+ 21 - 1
src/views/expend/expendMx.vue

@@ -93,6 +93,19 @@
           </el-col>
 
           <el-col :span="1.5">
+            <el-form-item label="是否带量">
+              <el-select style="width: 200px" size="mini" clearable v-model="params.isWhether" placeholder="请选择">
+                <el-option
+                  v-for="item in options1"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+              </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
             <el-form-item label-width="80px">
               <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
               <el-button size="mini" plain icon="el-icon-refresh" @click="resetList">重置</el-button>
@@ -151,7 +164,7 @@
 <script>
 import { mxList, pullMx, huizongMX, exportMx } from '@/api/expend/expendMx.js'
 export default {
-  dicts: ['sys_status', 'sys_number_yes_no'],
+  dicts: ['sys_status', 'sys_number_yes_no', 'carry_or_not'],
   components: {
     Add: () => import("./expendMxDetail.vue"),
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
@@ -167,6 +180,7 @@ export default {
       size: "mini",
       loading: false,
       options: [{value: '0', label: '是'}, {value: '2', label: '否'}],
+      options1: [{value: '0', label: '否'}, {value: '1', label: '是'}],
       params: {
         code: '',
         custCode: '',
@@ -174,6 +188,8 @@ export default {
         startDate: '',
         endDate: '',
         settleNo: '',
+        isSum: '',
+        isWhether: ''
       },
       pageInfo: {
         pageNum: 1,
@@ -199,6 +215,10 @@ export default {
           is: 'el-dict-tag',
           dictName: "sys_number_yes_no",
         } },
+        { item: { key: "isWhether", title: "是否带量" }, attr: {
+          is: 'el-dict-tag',
+          dictName: "carry_or_not",
+        } },
         { item: { key: "settleNo", title: "结算单号"}, attr: {} },
         { item: { key: "startDate", title: "结算开始日期" }, attr: {} },
         { item: { key: "endDate", title: "结算截止日期" }, attr: {} },

+ 66 - 5
src/views/expend/expendMxDetail.vue

@@ -106,6 +106,19 @@
           </el-col>
 
           <el-col :span="1.5">
+            <el-form-item label="是否带量" prop="isWhether">
+              <el-select style="width: 200px" size="mini" :disabled="sonDisable" clearable v-model="basicForm.isWhether" placeholder="请选择">
+                <el-option
+                  v-for="item in options1"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
             <el-form-item label="备注" prop="remark">
               <el-input style="width: 200px" clearable :disabled="sonDisable" size="mini" v-model="basicForm.remark">
               </el-input>
@@ -125,11 +138,28 @@
       <div class="btn_grooup">
         <span>明细信息</span>
         <div>
-          <!-- <el-button type="primary" size="mini" @click="addLine" v-if="!sonDisable">增行</el-button> -->
+          <el-button type="primary" size="mini" @click="editLine" v-if="!sonDisable">批量修改</el-button>
           <!-- <el-button type="primary" size="mini" @click="delLines" v-if="!sonDisable">删行</el-button> -->
         </div>
       </div>
 
+      <el-dialog title="批量修改" @close="clearInfo" :visible.sync="dialogFormVisible">
+        <el-form :model="dialogForm" label-width="auto">
+          <el-form-item label="明细信息">
+            <el-select size="mini" v-model="dialogForm.region">
+              <el-option label="服务费率" value="ratio"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="修改值">
+            <el-input-number clearable size="mini" :min="1" v-model="dialogForm.info"></el-input-number>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="dialogFormVisible = false">取 消</el-button>
+          <el-button size="mini" type="primary" @click="confirm">确 定</el-button>
+        </div>
+      </el-dialog>      
+
       <ux-grid
         :data="basicForm.itemList"
         border
@@ -197,12 +227,19 @@ export default {
         endDate: '',
         totalAmount: '',
         isSum: '',
+        isWhether: '',
         remark: '',
         itemList: []
       },
       options: [{value: '0', label: '是'}, {value: '2', label: '否'}],
+      options1: [{value: '0', label: '否'}, {value: '1', label: '是'}],
       basicRules: {},
       ids:[],
+      dialogFormVisible:false,
+      dialogForm:{
+        region: 'ratio',
+        info: ''
+      }
     }
   },
   created() {
@@ -255,6 +292,7 @@ export default {
           this.sonPageStu = 'check'
           this.sonDisable = true
           this.getDetails(this.row)
+          this.ids = []
         }
       })
     },
@@ -263,12 +301,35 @@ export default {
       this.$emit('refresh')
     },
     handleSelectionChange(selection) {
-      this.ids = selection.map(item =>{
-        return item.id
-      })
+      // this.ids = selection.map(item =>{
+      //   return item.id
+      // })
+      this.ids = selection
+      // console.log('选中数组1', selection)
       console.log('选中数组', this.ids)
     },
-    addLine() {},
+    editLine() {
+      if(this.ids.length <= 0) {
+        this.$modal.notifyWarning("请至少选择一条数据进行操作!");
+      } else {
+        this.dialogFormVisible = true
+      }
+    },
+    confirm() {
+      console.log(this.ids)
+      console.log('修改值',this.dialogForm)
+      this.ids.forEach(item => {
+        item[this.dialogForm.region] = this.dialogForm.info
+        item.serviceFee = ((item.ratio*0.01) * item.amount).toFixed(2)
+      })
+      this.dialogFormVisible = false
+    },
+    clearInfo() {
+      this.dialogForm = {
+        region: 'ratio',
+        info: ''
+      }
+    },
     delLines() {},
     toOA() {
       this.$modal.loading("正在提交,请稍后...");

+ 2 - 3
src/views/purchase/DemandSummary/add/index.vue

@@ -59,9 +59,8 @@ export default {
     async fetchItem() {
       try {
         this.loading = true;
-        let { code, msg, data } = await getSummaryDetail({
-          ...this.$props.data,
-        });
+        const { demandItemId } = this.$props.data;
+        let { code, msg, data } = await getSummaryDetail({ demandItemId });
         if (code == 200) {
           this.params = data;
         }

+ 5 - 2
src/views/purchase/task/tui-hui-xu-qiu/index.vue

@@ -21,8 +21,11 @@ export default {
     disabled: {
       get() {
         if (this.selectData.length > 0) {
-          // status: '4' 已关闭
-          let close = this.selectData.findIndex((item) => item.status === "4");
+          // status '4' :已关闭  '1':已执行协议直采  '2':已部分协议直采
+          let close = this.selectData.findIndex(
+            (item) =>
+              item.status === "4" || item.status === "1" || item.status === "2"
+          );
           return close !== -1;
         }
         return true;

+ 525 - 0
src/views/purchase/transferOrder/bipPull/detail.vue

@@ -0,0 +1,525 @@
+<script>
+import useColumns from "./detailColumns";
+import { REFER } from "@/components/popover-select/api";
+import { getOrderDetail, bipPullVerify } from "@/api/purchase/transferOrder.js";
+export default {
+  name: "AddTransfer",
+  props: {
+    addType: {
+      type: String,
+      default: "add",
+    },
+    dict: {
+      type: Object,
+    },
+    data: {
+      tyep: Object,
+    },
+  },
+  components: {
+    ElSuperForm: () => import("@/components/super-form/index.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+    ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
+    ReservedButton: () => import("../reserved/index.vue"),
+  },
+  data() {
+    const {
+      FormColumns,
+      TabColumns,
+      TabColumns: [
+        {
+          item: { key: tabName },
+        },
+      ],
+    } = useColumns();
+    const params = this.$init.params([...TabColumns, ...FormColumns]);
+    const rules = this.$init.rules([...TabColumns, ...FormColumns]);
+    return {
+      rules,
+      params: {
+        ...params,
+        dwCsFlag: null,
+        swCsFlag: null,
+      },
+      tabName,
+      TabColumns,
+      FormColumns,
+      size: "mini",
+      width: "100%",
+      count: 0,
+      loading: false,
+      visible: false,
+      control: false,
+    };
+  },
+  computed: {
+    title: {
+      get() {
+        const { addType } = this.$props;
+        if (addType === "edit") {
+          return "编 辑";
+        } else if (addType === "see") {
+          return "查 看";
+        } else {
+          return "新 增";
+        }
+      },
+      set() {},
+    },
+    tabInfo: {
+      get() {
+        const {
+          stAllotMaterialList,
+          stAllotReceiveDeliverList,
+          stAllotReceiveExecuteList,
+          stAllotReceiveExpenseList,
+        } = this.params;
+        return {
+          stAllotMaterialList: stAllotMaterialList.filter(
+            ({ delFlag }) => delFlag !== "2"
+          ),
+          stAllotReceiveDeliverList,
+          stAllotReceiveExecuteList,
+          stAllotReceiveExpenseList,
+        };
+      },
+      set() {},
+    },
+    tableHeight: {
+      get() {
+        return window.innerHeight - 430;
+      },
+      set() {},
+    },
+  },
+  watch: {
+    // 调出库存组织
+    "params.deliveryInventoryOrgName": {
+      handler: function (nVal, oVal) {
+        this.control &&
+        (this.params = {
+          ...this.params,
+          deliveryWarehouse: null,
+          deliveryWarehouseCode: null,
+          deliveryWarehouseName: null,
+          deliveryDept: null,
+          deliveryDeptCode: null,
+          deliveryDeptName: null,
+        });
+      },
+    },
+    // 调入库存组织
+    "params.storageInventoryOrgName": {
+      handler: function (nVal, oVal) {
+        this.control &&
+        (this.params = {
+          ...this.params,
+          storageWarehouse: null,
+          storageWarehouseName: null,
+          stAllotMaterialList: this.params["stAllotMaterialList"].map(
+            (item) => ({
+              ...item,
+              storageDept: null,
+              storageDeptCode: null,
+              storageDeptName: null,
+            })
+          ),
+        });
+      },
+    },
+    // 调出仓库
+    "params.deliveryWarehouseName": {
+      handler: function (nVal, oVal) {
+        this.control &&
+        (this.params = {
+          ...this.params,
+          stAllotMaterialList: this.params["stAllotMaterialList"].map(
+            (item) => ({
+              ...item,
+              deliveryAllocation: null,
+              deliveryAllocationCode: null,
+              deliveryAllocationName: null,
+            })
+          ),
+        });
+      },
+    },
+    // 调入仓库
+    "params.storageWarehouseName": {
+      handler: function (nVal, oVal) {
+        this.control &&
+        (this.params = {
+          ...this.params,
+          stAllotMaterialList: this.params["stAllotMaterialList"].map(
+            (item) => ({
+              ...item,
+              storageAllocation: null,
+              storageAllocationCode: null,
+              storageAllocationName: null,
+            })
+          ),
+        });
+      },
+    },
+  },
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    //
+    hide() {
+      const {
+        FormColumns,
+        TabColumns,
+        TabColumns: [
+          {
+            item: { key: tabName },
+          },
+        ],
+      } = useColumns();
+      this.params = {
+        ...this.$init.params([...TabColumns, ...FormColumns]),
+        dwCsFlag: null,
+        swCsFlag: null,
+      };
+      this.control = false;
+      this.tabName = tabName;
+      this.TabColumn = TabColumns;
+      this.$refs["superForm"].clearValidate();
+      this.visible = false;
+      this.$emit("refresh");
+    },
+    //
+    async beforeOpen() {
+      const { data, addType } = this.$props;
+      if (!data.id) {
+        // 新增
+        const { name, nickName } = this.$store.state.user;
+        this.params = {
+          ...this.params,
+          status: "0",
+          createBy: name,
+          createByName: nickName,
+          billDate: new Date().Format("yyyy-MM-dd"),
+          createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
+        };
+        this.control = true;
+        this.useRowAdd(this.tabName);
+      } else {
+        await this.fetchItem(data);
+        this.$nextTick(async () => {
+          // 复制
+          if (addType === "add") {
+            const { name, nickName } = this.$store.state.user;
+            this.params = {
+              ...this.params,
+              id: "",
+              code: "",
+              oaId: "",
+              ncCode: "",
+              status: "0",
+              sendNcRes: "",
+              updateBy: "",
+              updateByName: "",
+              updateTime: "",
+              storageCode: "",
+              deliveryCode: "",
+              createBy: name,
+              createByName: nickName,
+              billDate: new Date().Format("yyyy-MM-dd"),
+              createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
+              stAllotMaterialList: this.params.stAllotMaterialList.map(
+                (item) => ({
+                  ...item,
+                  id: "",
+                  allotId: "",
+                  allotDate: "",
+                  deliveryCode: "",
+                  storageCode: "",
+                  createBy: name,
+                  createByName: nickName,
+                  updateBy: null,
+                  updateByName: null,
+                  createTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
+                  updateTime: null,
+                })
+              ),
+            };
+          }
+          this.control = true;
+          // 调入/出货位禁用——根据调入/出仓库
+          const { deliveryWarehouse, storageWarehouse } = this.params;
+          this.params.dwCsFlag = await this.fetchWarehouse(deliveryWarehouse);
+          this.params.swCsFlag = await this.fetchWarehouse(storageWarehouse);
+        });
+      }
+    },
+    // 查询仓库
+    async fetchWarehouse(id) {
+      try {
+        let { code, rows } = await REFER(
+          {
+            type: "WAREHOUSE_PARAM",
+            search: "",
+            id,
+            isPage: true,
+          },
+          { pageNum: 1, pageSize: 10 }
+        );
+        return rows[0] ? rows[0].csFlag : null;
+      } catch (error) {}
+    },
+    //
+    async fetchItem(prop) {
+      try {
+        this.loading = true;
+        const { addType } = this.$props;
+
+        let { code, data, msg } = await getOrderDetail(prop.id);
+        if (code == 200) {
+          this.params = {
+            ...this.params,
+            ...data,
+          };
+        }
+      } catch (error) {
+      } finally {
+        this.loading = false;
+      }
+    },
+    // 拉单
+    useSave(prop) {
+      const { params } = this;
+      this.$modal.loading("拉单中...");
+      bipPullVerify(params).then((response) => {
+        if (response.code === 200) {
+          this.$modal.notifySuccess("拉单成功");
+        }
+        this.$modal.closeLoading();
+      }).catch(() => {
+        this.$modal.closeLoading();
+      });
+    },
+    // 子表数量改变
+    changeQty(tabName) {
+      this.params.qty = this.params["stAllotMaterialList"].reduce(
+        (sum, item) => {
+          if (item.delFlag !== "2") {
+            sum += item.qty;
+          }
+          return sum;
+        },
+        0
+      );
+    },
+  },
+  created() {},
+};
+</script>
+
+<template>
+  <el-drawer
+    v-loading="loading"
+    v-bind="$attrs"
+    v-on="$listeners"
+    :size="width"
+    :show-close="false"
+    :visible.sync="visible"
+    destroy-on-close
+    @close="hide"
+    @open="beforeOpen"
+  >
+    <div
+      slot="title"
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <h3>{{ title }}</h3>
+      <div>
+        <el-button
+          v-if="addType !== 'see'"
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useSave('superForm')"
+        >保 存</el-button
+        >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+        >取 消</el-button
+        >
+      </div>
+    </div>
+    <el-super-form
+      v-model="params"
+      :dict="dict"
+      :rules="rules"
+      :size="$attrs.size"
+      :columns="FormColumns"
+      ref="superForm"
+      label-width="auto"
+      label-position="right"
+      style="padding: 20px"
+      :disabled="addType === 'see'"
+    >
+      <!-- 调出仓库 -->
+      <template slot="deliveryWarehouseName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="params.deliveryInventoryOrg"
+        >
+        </component
+        ></template>
+      <!-- 调出部门 -->
+      <template slot="deliveryDeptName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="params.deliveryInventoryOrg"
+        >
+        </component
+        ></template>
+      <!-- 调入仓库 -->
+      <template slot="storageWarehouseName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="params.storageInventoryOrg"
+        >
+        </component
+        ></template>
+    </el-super-form>
+
+    <div style="position: relative">
+      <el-tabs v-model="tabName" style="padding: 0 20px 20px">
+        <el-tab-pane
+          v-for="({ item, TableColumns: columns }, index) in TabColumns"
+          :key="index"
+          :label="item.title"
+          :name="item.key"
+          lazy
+        >
+          <el-super-ux-table
+            v-model="tabInfo[item.key]"
+            index
+            :dict="dict"
+            :ref="tabName"
+            :columns="columns"
+            :size="$attrs.size"
+            :height="tableHeight"
+          >
+            <!-- 物料编码 -->
+            <template slot="materialCode" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="true"
+              >
+              </component>
+            </template>
+            <!-- 数量 -->
+            <template slot="qty" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="true"
+                @change="changeQty(tabName)"
+              >
+              </component>
+            </template>
+            <!-- 调入部门 -->
+            <template slot="storageDeptName" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="addType === 'see' || params.storageInventoryOrg"
+                :queryParams="
+                  () => ({
+                    drpOrg: params.storageInventoryOrg,
+                  })
+                "
+              >
+              </component>
+            </template>
+            <!-- 产品批号 -->
+            <template slot="producBatch" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="addType === 'see' || !scope.row['materialCode']"
+              >
+              </component>
+            </template>
+            <!-- 调出货位 -->
+            <template slot="deliveryAllocationName" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="
+                  true
+                "
+                :queryParams="
+                  () => ({
+                    stordocId: params.deliveryWarehouse,
+                  })
+                "
+              >
+              </component>
+            </template>
+            <!-- 调入货位 -->
+            <template slot="storageAllocationName" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="
+                  addType === 'see' ||
+                  !params.swCsFlag ||
+                  params.swCsFlag === 'N'
+                "
+                :queryParams="
+                  () => ({
+                    stordocId: params.storageWarehouse,
+                  })
+                "
+              >
+              </component>
+            </template>
+          </el-super-ux-table>
+        </el-tab-pane>
+      </el-tabs>
+
+      <div style="position: absolute; top: 5px; right: 20px">
+        <reserved-button
+          v-show="addType === 'see'"
+          type="primary"
+          :info="data"
+          :size="$attrs.size"
+        />
+      </div>
+    </div>
+  </el-drawer>
+</template>
+
+<style scoped>
+>>> .el-drawer__header {
+  margin-bottom: 0;
+  padding: 5px 20px;
+}
+</style>

+ 652 - 0
src/views/purchase/transferOrder/bipPull/detailColumns.js

@@ -0,0 +1,652 @@
+export default function useColumns() {
+
+  const FormColumns = [
+    {
+      item: { key: "code", title: "单据号", },
+      attr: {
+        is: "el-input",
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "billDate", title: "单据日期", required: true, },
+      attr: {
+        is: "el-date-picker",
+        clearable: true,
+        type: "date",
+        valueFormat: "yyyy-MM-dd",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "billType", title: "订单类型", required: true, },
+      attr: {
+        is: "el-select",
+        dictName: "sys_allot_billtype",
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "allotType", title: "调拨方式",},
+      attr: {
+        is: "el-select",
+        dictName: "sys_to_type",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "status", title: "单据状态", },
+      attr: {
+        is: "el-select",
+        dictName: "sys_status",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "qty", title: "总数量", },
+      attr: {
+        is: "el-input-number",
+        min: 0,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "customerName", title: "客户", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "CUSTOMER_PARAM",
+        dataMapping: {
+          customer: 'id',
+          customerName: 'name',
+        },
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "remark", title: "备注", },
+      attr: {
+        is: "el-input",
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "deliveryInventoryOrgName", title: "调出库存组织", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "ORG_PARAM",
+        dataMapping: {
+          deliveryInventoryOrg: "id",
+          deliveryInventoryOrgCode: "code",
+        },
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "deliveryWarehouseName", title: "调出仓库", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "WAREHOUSE_PARAM",
+        dataMapping: {
+          deliveryWarehouse: "id",
+          deliveryWarehouseCode: "code",
+          dwCsFlag: "csFlag",
+        },
+        queryParams: (params) => ({
+          pkOrg: params.deliveryInventoryOrg,
+        }),
+        clearable: true,
+        disabled: true
+      }
+    },
+    {
+      item: { key: "deliveryDeptName", title: "调出部门", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "DEPT_PARAM",
+        dataMapping: {
+          deliveryDept: "id",
+          deliveryDeptCode: "code",
+        },
+        queryParams: (params) => ({
+          // parame
+          drpOrg: params.deliveryInventoryOrg,
+        }),
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "businessPersonalName", title: "调出业务员", },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "CONTACTS_PARAM",
+        dataMapping: {
+          businessPersonal: "code",
+        },
+        clearable: true,
+        disabled: true,
+      }
+    },
+
+    {
+      item: { key: "storageInventoryOrgName", title: "调入库存组织", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "ORG_PARAM",
+        dataMapping: {
+          storageInventoryOrg: "id",
+          storageInventoryOrgCode: "code",
+        },
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "storageWarehouseName", title: "调入仓库", required: true, },
+      attr: {
+        is: "el-popover-select-v2",
+        valueKey: "name",
+        referName: "WAREHOUSE_PARAM",
+        dataMapping: {
+          storageWarehouse: "id",
+          storageWarehouseCode: "code",
+          swCsFlag: "csFlag",
+        },
+        queryParams: (params) => ({
+          pkOrg: params.storageInventoryOrg,
+        }),
+        clearable: true,
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "deliveryCode", title: "调拨出库单号", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "storageCode", title: "调拨入库单号", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "ncCode", title: "NC单据号", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+      }
+    },
+    {
+      item: { key: "createByName", title: "制单人", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "createTime", title: "制单日期", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "createByName", title: "创建人", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "createTime", title: "创建时间", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "updateByName", title: "最后修改人", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "updateTime", title: "最后修改时间", },
+      attr: {
+        is: "el-input",
+        disabled: true,
+        clearable: true,
+      }
+    },
+    {
+      item: { key: "sendNcRes", title: "同步NC结果", span: 12 },
+      attr: {
+        is: "el-input",
+        type: "textarea",
+        rows: 3,
+        disabled: true,
+        clearable: true,
+      }
+    },
+  ].map(({ item, attr }) => ({
+    attr,
+    item: { ...item, span: item.span || 6 },
+  }));
+
+  const TabColumns = [
+    // 物料信息
+    {
+      item: { key: "stAllotMaterialList", title: "物料信息" },
+      attr: { value: [] },
+      TableColumns: [
+        {
+          item: { key: "rowno", title: "行号", width: 80, },
+          attr: {}
+        },
+        {
+          item: { key: "materialCode", title: "物料编码", require: true, },
+          attr: {
+            is: "el-popover-select-v2",
+            valueKey: "code",
+            referName: "MATERIAL_PARAM",
+            dataMapping: {
+              material: "id",
+              materialName: "name",
+              specification: "specification",
+              model: "model",
+              unit: "unitId",
+              unitName: "unitIdName",
+              manufacturer: "manufacturerIdName",
+              originPlace: "originPlace",
+              originPlaceName: "originPlaceName",
+            },
+            clearable: true,
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "materialName", title: "物料名称", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "qty", title: "数量", require: true, },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            clearable: true,
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "unitName", title: "单位", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "specification", title: "规格", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "model", title: "型号", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "manufacturer", title: "生产厂家/代理人", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "originPlaceName", title: "产地", },
+          attr: {
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "storageDeptName", title: "调入部门", require: true, },
+          attr: {
+            is: "el-popover-select-v2",
+            valueKey: "name",
+            referName: "DEPT_PARAM",
+            dataMapping: {
+              storageDept: "id",
+              storageDeptCode: "code",
+            },
+            clearable: true,
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "producBatch", title: "产品批号", require: true},
+          attr: {
+            is: "el-popover-select-v2",
+            valueKey: "code",
+            referName: "PATCHCODE_ZT",
+            clearable: true,
+            queryParams: (params) => ({
+              code: params.materialCode,
+            })
+          }
+        },
+        {
+          item: { key: "deliveryAllocationName", title: "调出货位", },
+          attr: {
+            is: "el-popover-select-v2",
+            valueKey: "name",
+            referName: "ALLOCATION_PARAM",
+            dataMapping: {
+              deliveryAllocation: "id",
+              deliveryAllocationCode: "code",
+            },
+            clearable: true,
+            disabled: true,
+          }
+        },
+        {
+          item: { key: "storageAllocationName", title: "调入货位", },
+          attr: {
+            is: "el-popover-select-v2",
+            valueKey: "name",
+            referName: "ALLOCATION_PARAM",
+            dataMapping: {
+              storageAllocation: "id",
+              storageAllocationCode: "code",
+            },
+            clearable: true,
+            disabled: true,
+          }
+        },
+      ]
+    },
+    // 收发货信息
+    {
+      item: { key: "stAllotReceiveDeliverList", title: "收发货信息" },
+      attr: { value: [] },
+      TableColumns: [
+        {
+          item: { key: "rowno", title: "行号", width: 80, },
+          attr: {}
+        },
+        {
+          item: { key: "deliveryCode", title: "调拨出库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "storageCode", title: "调拨入库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufacturer", title: "生产厂家/代理人", },
+          attr: {}
+        },
+        {
+          item: { key: "originPlace", title: "产地", },
+          attr: {}
+        },
+        {
+          item: { key: "classify", title: "类别", },
+          attr: {}
+        },
+        {
+          item: { key: "deliveryWarehouseName", title: "调出仓库", },
+          attr: {}
+        },
+        {
+          item: { key: "storageWarehouseName", title: "调入仓库", },
+          attr: {}
+        },
+        {
+          item: { key: "businessPersonalName", title: "调入业务员", },
+          attr: {}
+        },
+        {
+          item: { key: "productBatch", title: "产品批号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufactureDate", title: "生产日期", },
+          attr: {}
+        },
+        {
+          item: { key: "periodEndDate", title: "有效期至/失效日期", },
+          attr: {}
+        },
+        {
+          item: { key: "ratifyCode", title: "批准文号", },
+          attr: {}
+        },
+        {
+          item: { key: "registration", title: "注册证号", },
+          attr: {}
+        },
+        {
+          item: { key: "productCode", title: "商品名", },
+          attr: {}
+        },
+        {
+          item: { key: "commonCode", title: "通用名", },
+          attr: {}
+        },
+        {
+          item: { key: "drug", title: "剂型", },
+          attr: {}
+        },
+        {
+          item: { key: "customerName", title: "收货客户", },
+          attr: {}
+        },
+        {
+          item: { key: "addressaddress", title: "收货地址", },
+          attr: {}
+        },
+        {
+          item: { key: "area", title: "收货地区", },
+          attr: {}
+        },
+        {
+          item: { key: "place", title: "收货地点", },
+          attr: {}
+        },
+        {
+          item: { key: "deliveryDate", title: "计划发货日期", },
+          attr: {}
+        },
+        {
+          item: { key: "strageDate", title: "计划到货日期", },
+          attr: {}
+        },
+        {
+          item: { key: "transportation", title: "运输方式", },
+          attr: {}
+        },
+        {
+          item: { key: "remark", title: "备注", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogistic", title: "客户物料编码", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogisticName", title: "客户物料名称", },
+          attr: {}
+        },
+
+      ]
+    },
+    // 价格费用
+    {
+      item: { key: "stAllotReceiveExecuteList", title: "价格费用" },
+      attr: { value: [] },
+      TableColumns: [
+        {
+          item: { key: "rowno", title: "行号", width: 80, },
+          attr: {}
+        },
+        {
+          item: { key: "deliveryCode", title: "调拨出库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "storageCode", title: "调拨入库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufacturer", title: "生产厂家/代理人", },
+          attr: {}
+        },
+        {
+          item: { key: "originPlace", title: "产地", },
+          attr: {}
+        },
+        {
+          item: { key: "classify", title: "类别", },
+          attr: {}
+        },
+        {
+          item: { key: "productBatch", title: "产品批号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufactureDate", title: "生产日期", },
+          attr: {}
+        },
+        {
+          item: { key: "periodEndDate", title: "有效期至/失效日期", },
+          attr: {}
+        },
+        {
+          item: { key: "ratifyCode", title: "批准文号", },
+          attr: {}
+        },
+        {
+          item: { key: "registration", title: "注册证号", },
+          attr: {}
+        },
+        {
+          item: { key: "productCode", title: "商品名", },
+          attr: {}
+        },
+        {
+          item: { key: "commonCode", title: "通用名", },
+          attr: {}
+        },
+        {
+          item: { key: "drug", title: "剂型", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogistic", title: "客户物料码", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogisticName", title: "客户物料名称", },
+          attr: {}
+        },
+
+      ]
+    },
+    // 执行结果
+    {
+      item: { key: "stAllotReceiveExpenseList", title: "执行结果" },
+      attr: { value: [] },
+      TableColumns: [
+        {
+          item: { key: "rowno", title: "行号", width: 80, },
+          attr: {}
+        },
+        {
+          item: { key: "deliveryCode", title: "调拨出库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "storageCode", title: "调拨入库单号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufacturer", title: "生产厂家/代理人", },
+          attr: {}
+        },
+        {
+          item: { key: "originPlace", title: "产地", },
+          attr: {}
+        },
+        {
+          item: { key: "classify", title: "类别", },
+          attr: {}
+        },
+        {
+          item: { key: "productBatch", title: "产品批号", },
+          attr: {}
+        },
+        {
+          item: { key: "manufactureDate", title: "生产日期", },
+          attr: {}
+        },
+        {
+          item: { key: "periodEndDate", title: "有效期至/失效日期", },
+          attr: {}
+        },
+        {
+          item: { key: "ratifyCode", title: "批准文号", },
+          attr: {}
+        },
+        {
+          item: { key: "registration", title: "注册证号", },
+          attr: {}
+        },
+        {
+          item: { key: "productCode", title: "商品名", },
+          attr: {}
+        },
+        {
+          item: { key: "commonCode", title: "通用名", },
+          attr: {}
+        },
+        {
+          item: { key: "drug", title: "剂型", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogistic", title: "客户物料码", },
+          attr: {}
+        },
+        {
+          item: { key: "customerLogisticName", title: "客户物料名称", },
+          attr: {}
+        },
+
+      ]
+    },
+
+  ];
+
+  return { FormColumns, TabColumns }
+}

+ 16 - 9
src/views/purchase/transferOrder/bipPull/index.vue

@@ -59,6 +59,15 @@
         </el-tabs>
       </el-card>
     </div>
+    <Detail
+      ref="Detail"
+      :data="rowDetail"
+      :size="size"
+      :dict="dict"
+      :addType="pageStu"
+      @refresh="getList(params, page)"
+    >
+    </Detail>
   </div>
 </template>
 
@@ -70,6 +79,7 @@ export default {
   name: "transferOrder",
   dicts: [...dicts, "oa_templete_id"],
   components: {
+    Detail: () => import("./detail.vue"),
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
@@ -118,6 +128,8 @@ export default {
         priceList: [],
         resultList: [],
       },
+      // 页面状态
+      pageStu: "",
       rowDetail: {},
       disable: false,
       ids: [],
@@ -183,15 +195,10 @@ export default {
     //确认
     verify() {
       if(this.selectedRow){
-        this.$modal.loading("处理中...");
-        bipPullVerify(this.selectedRow).then((response) => {
-          if (response.code === 200) {
-            this.$modal.notifySuccess("拉单成功");
-          }
-          this.$modal.closeLoading();
-        }).catch(() => {
-          this.$modal.closeLoading();
-        });
+        const { setVisible } = this.$refs.Detail;
+        setVisible(true);
+        this.pageStu = "edit";
+        this.rowDetail = this.selectedRow;
       }else{
         this.$modal.msgWarning("请选择一条数据!");
       }