yusheng 1 년 전
부모
커밋
f243fdca7a

+ 54 - 0
src/api/purchasingManage/invoiceConfirm.js

@@ -0,0 +1,54 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取列表
+ */
+export async function getPurchasereceiveconfirmList(params) {
+  const res = await request.get(`/eom/purchasereceiveconfirm/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取信息详情
+ */
+export async function getReceiveConfirmDetail(id) {
+  const res = await request.get(`/eom/purchasereceiveconfirm/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 更新信息
+ */
+export async function UpdateReceiveConfirmInformation(data) {
+  const res = await request.put(`/eom/purchasereceiveconfirm/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addReceiveConfirmInformation(data) {
+  const res = await request.post(`/eom/purchasereceiveconfirm/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteReceiveConfirmInformation(data) {
+  const res = await request.delete('/eom/purchasereceiveconfirm/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 12 - 2
src/views/purchasingManage/purchaseOrder/index.vue

@@ -178,6 +178,10 @@
         <div v-if="activeComp == 'invoice'">
           <invoice></invoice>
         </div>
+        <div v-if="activeComp == 'invoiceConfirm'">
+          <invoiceConfirm></invoiceConfirm>
+        </div>
+
         <div v-if="activeComp == 'returnorder'" class="returnorder">
           <return-goods></return-goods>
         </div>
@@ -187,7 +191,11 @@
       </div>
     </el-card>
 
-    <add-dialog ref="addDialogRef" @done="reload" :isRequired="isRequired"></add-dialog>
+    <add-dialog
+      ref="addDialogRef"
+      @done="reload"
+      :isRequired="isRequired"
+    ></add-dialog>
     <add-invoice-dialog
       ref="invoiceDialogRef"
       @done="reload"
@@ -237,6 +245,7 @@
   import searchTable from './components/searchTable.vue';
   import addDialog from './components/addDialog.vue';
   import invoice from './invoice/index.vue';
+  import invoiceConfirm from './invoiceConfirm/index.vue';
   import detailDialog from './components/detailDialog.vue';
   import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
   import addInvoiceDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog';
@@ -282,7 +291,7 @@
       outSourceSend,
       addOutSourceSend,
       addInvoiceManage,
-      importDialog
+      importDialog,invoiceConfirm
     },
     data() {
       return {
@@ -291,6 +300,7 @@
           { key: 'saleorder', name: '采购订单' },
           { key: 'outsourceSend', name: '委外发货单' },
           { key: 'invoice', name: '收货单' },
+          { key: 'invoiceConfirm', name: '收货确认单' },
           { key: 'returnorder', name: '退货单' },
           { key: 'accountstatement', name: '对账单' }
         ],

+ 1 - 8
src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue

@@ -84,14 +84,7 @@
               </el-select>
             </el-form-item>
 
-            <!-- <el-form-item v-if="form.reviewStatus == 2" label="入库单:">
-              <el-link
-                type="primary"
-                :underline="false"
-                @click="handleInnerBound"
-                >点击查看入库单</el-link
-              >
-            </el-form-item> -->
+
           </el-col>
 
           <el-col :span="8">

+ 679 - 0
src/views/purchasingManage/purchaseOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -0,0 +1,679 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    v-if="visible"
+    :visible.sync="visible"
+    :title="title"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    width="70%"
+    @close="cancel"
+    :maxable="true"
+    :resizable="true"
+  >
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      class="el-form-box"
+      label-width="140px"
+    >
+      <headerTitle title="收货确认单信息"></headerTitle>
+      <el-row :gutter="12">
+        <el-col :span="12">
+          <el-form-item label="收货单" prop="receiveCode">
+            <el-input
+              clearable
+              v-model="form.receiveCode"
+              @click.native="handleOrderBtn"
+              placeholder="请输入"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item prop="repliedFiles" label="回执附件">
+            <fileMain v-model="form.repliedFiles"></fileMain>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <headerTitle title="收货信息"></headerTitle>
+
+      <el-row :gutter="12">
+        <el-col :span="12">
+          <el-form-item label="收货单编码:" prop="receiveCode">
+            <el-input v-model="form.receiveCode" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item prop="orderNo" label="订单编码:">
+            <el-input v-model="form.orderNo" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <!-- <el-col :span="12">
+          <el-form-item prop="outsourceSendCode" label="委外发货单编码:">
+            <el-input v-model="form.outsourceSendCode" disabled></el-input>
+          </el-form-item>
+        </el-col> -->
+        <el-col :span="12">
+          <el-form-item label="供应商名称:" prop="supplierName">
+            <el-input v-model="form.supplierName" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="供应商联系人:" prop="linkName">
+            <el-input v-model="form.linkName" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="供应商电话:" prop="linkPhone">
+            <el-input v-model="form.linkPhone" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="车牌号:" prop="carNo">
+            <el-input v-model="form.carNo" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item prop="receiveDate" label="收货日期:">
+            <el-input v-model="form.receiveDate" disabled></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="附件:" prop="receiveFiles">
+            <fileMain v-model="form.receiveFiles" type="view"></fileMain>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <headerTitle title="物品清单"></headerTitle>
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :cache-key="cacheKeyUrl"
+      @columns-change="handleColumnChange"
+      :datasource="form.productList"
+      row-key="id"
+      max-height="500px"
+    >
+      <template v-slot:technicalDrawings="{ row }">
+        <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
+      </template>
+      <template v-slot:isException="scope">
+        <el-select v-model="scope.row.isException" placeholder="请选择">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </template>
+
+      <template v-slot:totalCount="scope">
+        <el-input
+          v-model="scope.row.confirmCount"
+          @input="totalCountChange(scope.row, scope.$index)"
+          type="number"
+          placeholder="请输入"
+        ></el-input>
+      </template>
+      <template v-slot:remark="scope">
+        <el-input v-model="scope.row.remark" placeholder="请输入"></el-input>
+      </template>
+    </ele-pro-table>
+
+    <div slot="footer" class="footer">
+      <el-button type="primary" @click="save" v-click-once>保存</el-button>
+      <el-button type="primary" @click="save('sub')" v-click-once
+        >提交</el-button
+      >
+
+      <el-button @click="cancel">返回</el-button>
+    </div>
+
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
+    <sendListDialog
+      ref="sendListDialogRef"
+      @changeParent="getSaleOrderDetail"
+    ></sendListDialog>
+  </ele-modal>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { getReceiveSaleOrderrecordDetail } from '@/api/purchasingManage/purchaseorderreceive';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  import sendListDialog from '@/views/purchasingManage/purchaseOrder/returnGoods/components/sendListDialog.vue';
+  import { levelList } from '@/enum/dict.js';
+  import {
+    addReceiveConfirmInformation,
+    getReceiveConfirmDetail,
+    UpdateReceiveConfirmInformation
+  } from '@/api/purchasingManage/invoiceConfirm';
+  import { copyObj } from '@/utils/util';
+
+  let formDef = {
+    receiveCode: '',
+    repliedFiles: '',
+    supplierName: '',
+    linkName: '',
+    linkPhone: '',
+    carNo: '',
+    receiveDate: '',
+    receiveFiles: '',
+    receiveNo: '',
+    productList: []
+  };
+  export default {
+    mixins: [dictMixins, tabMixins],
+    components: {
+      processSubmitDialog,
+      sendListDialog
+    },
+
+    data() {
+      return {
+        cacheKeyUrl: 'eos-purchasingManage-invoiceConfirm-inventoryTable',
+        visible: false,
+        processSubmitDialogFlag: false,
+        title: '',
+        form: {
+          ...formDef
+        },
+
+        options: [
+          { value: 0, label: '无异常' },
+          { value: 1, label: '有异常' }
+        ],
+        rules: {
+          sendNo: [
+            { required: true, message: '请选择发货单', trigger: 'change' }
+          ],
+          repliedFiles: [
+            { required: true, message: '请上传回执附件', trigger: 'change' }
+          ]
+        },
+
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false
+      };
+    },
+    created() {
+      this.requestDict('产地');
+      this.requestDict('生产类型');
+    },
+    computed: {
+      columns() {
+        return [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 200,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'productCategoryName',
+            label: '类型',
+            slot: 'productCategoryName',
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
+
+          {
+            width: 120,
+            prop: 'supplierMark',
+            label: '供应商代号',
+            slot: 'supplierMark',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'warehouseName',
+            label: '仓库名称',
+            slot: 'warehouseName',
+            align: 'center'
+          },
+
+          {
+            width: 80,
+            prop: 'totalCount',
+            label: '收货数量',
+            align: 'center'
+          },
+          {
+            width: 150,
+            prop: 'confirmCount',
+            label: '确认数量',
+            slot: 'totalCount',
+            align: 'center'
+          },
+
+          {
+            width: 80,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            slot: 'measuringUnit',
+            align: 'center'
+          },
+          // {
+          //   width: 120,
+          //   prop: 'singleWeight',
+          //   label: '单重',
+          //   slot: 'singleWeight',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 200,
+          //   prop: 'sendTotalWeight',
+          //   label: '发货总重',
+          //   slot: 'sendTotalWeight',
+          //   align: 'center',
+          //   headerSlot: 'headerTotalCount'
+          // },
+          // {
+          //   width: 100,
+          //   prop: 'receiveTotalWeight',
+          //   label: '收货总重',
+          //   slot: 'receiveTotalWeight',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 100,
+          //   prop: 'increaseTotalWeight',
+          //   label: '增重重量',
+          //   slot: 'increaseTotalWeight',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 100,
+          //   prop: 'weightUnit',
+          //   label: '重量单位',
+          //   slot: 'weightUnit',
+          //   align: 'center'
+          // },
+          {
+            width: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find((item) => item.value == _row.goodsLevel)
+                ?.label;
+            },
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
+            width: 150,
+            prop: 'notaxSinglePrice',
+            label: '不含税单价',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'discountSinglePrice',
+            label: '折后单价',
+            slot: 'discountSinglePrice',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'discountTotalPrice',
+            label: '折后合计',
+            slot: 'discountTotalPrice',
+            align: 'center'
+          },
+          {
+            prop: 'provenance',
+            label: '产地',
+            slot: 'provenance',
+            align: 'center',
+            minWidth: 200,
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.provenance && row.provenance.length
+                ? row.provenance
+                    .map((item) => this.getDictValue('产地', item))
+                    .join(',')
+                : '';
+            }
+          },
+          {
+            prop: 'productionDate',
+            label: '生产日期',
+            slot: 'productionDate',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            width: 160,
+            prop: 'deliveryDeadline',
+            label: '交期截止日期',
+            slot: 'deliveryDeadline',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'guaranteePeriod',
+            label: '有效期',
+            slot: 'guaranteePeriod',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            }
+          },
+          {
+            width: 160,
+            prop: 'guaranteePeriodDeadline',
+            label: '有效期截止日期',
+            slot: 'guaranteePeriodDeadline',
+            align: 'center'
+          },
+          {
+            width: 130,
+            prop: 'technicalAnswerName',
+            label: '技术答疑人',
+            slot: 'technicalAnswerName',
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'technicalParams',
+            label: '技术参数',
+            slot: 'technicalParams',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'technicalDrawings',
+            label: '技术图纸',
+            slot: 'technicalDrawings',
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
+          },
+          {
+            width: 120,
+            slot: 'isException',
+            prop: 'isException',
+            label: '收货状态',
+            align: 'center',
+            fixed: 'right'
+          }
+        ];
+      }
+    },
+
+    methods: {
+      //选择发货单回调
+      handleOrderBtn() {
+        this.$refs.sendListDialogRef.open();
+      },
+      //发货单详情
+      async getSaleOrderDetail(res) {
+        this.loading = true;
+
+        let row = await getReceiveSaleOrderrecordDetail(res.id);
+        this.loading = false;
+
+        row.productList = row.productList.map((item) => {
+          delete item.id;
+          item['isException'] = 0;
+          item['confirmCount'] = item.totalCount;
+          return item;
+        });
+        if (row) {
+          row.receiveId = row.id;
+          row.receiveCode = row.receiveNo;
+          row.reviewStatus = 0;
+          row.processInstanceId = '';
+          let data = copyObj(row);
+          delete data.id;
+          if (this.isUpdate) {
+            data.receiveConfirmNo = this.form.receiveConfirmNo;
+            data.id = this.form.id;
+            data.reviewStatus = this.form.reviewStatus;
+            data.processInstanceId = this.form.processInstanceId;
+          }
+          this.form = data;
+        }
+      },
+
+      // //发货单确认详情
+      async getSendSaleOrderDetail(id) {
+        this.businessId = id;
+        this.loading = true;
+        const data = await getReceiveConfirmDetail(id);
+        this.loading = false;
+        if (data) {
+          this.form = data;
+        }
+      },
+
+      //打开新增编辑弹框
+      async open(type, row, invoiceData) {
+        this.title =
+          type === 'add' ? '新增收货确认单' : type === 'view' ? '详情' : '修改';
+        this.visible = true;
+        if (row && row?.id) {
+          await this.getSendSaleOrderDetail(row?.id);
+        }
+        if (invoiceData) {
+          this.changeOrder(invoiceData);
+        }
+        this.isUpdate = type != 'add';
+      },
+      totalCountChange(row, index) {
+        if (row.confirmCount < 0) {
+          this.$set(this.form.productList[index], 'confirmCount', 0);
+        }
+        if (row.confirmCount && row.singlePrice) {
+          this.$set(
+            this.form.productList[index],
+            'totalPrice',
+            row.confirmCount * row.singlePrice
+          );
+        }
+      },
+      getValidate() {
+        return Promise.all([
+          new Promise((resolve, reject) => {
+            this.$refs.form.validate((valid) => {
+              if (!valid) {
+                reject(false);
+              } else {
+                resolve(true);
+              }
+            });
+          })
+        ]).catch((e) => {
+          this.$message.warning('有必填项未填写,请检查');
+          return Promise.reject(e);
+        });
+      },
+      // 添加
+      handlAdd() {
+        if (!this.form.sendNo) return this.$message.error('请先选择来源单据');
+        this.handleSelectGoods();
+      },
+      async save(type) {
+        try {
+          await this.getValidate();
+          // 表单验证通过,执行保存操作
+          this.loading = true;
+
+          if (!this.isUpdate) {
+            delete this.form.id;
+          }
+          this.form.repliedFiles = this.form.repliedFiles || [];
+          this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
+          let commitData = Object.assign({}, this.form);
+          const API = this.isUpdate
+            ? UpdateReceiveConfirmInformation
+            : addReceiveConfirmInformation;
+          API(commitData)
+            .then((res) => {
+              this.loading = false;
+              this.$message.success('修改成功');
+              if (type === 'sub') {
+                this.sendSubmit(res);
+                return;
+              }
+              this.cancel();
+              this.$emit('done');
+            })
+            .catch((e) => {
+              //this.loading = false;
+            });
+        } catch (error) {
+          console.log(error);
+          // 表单验证未通过,不执行保存操作
+        }
+      },
+      async sendSubmit(res) {
+        const data = await getSendSaleOrderConfirmDetail(
+          this.businessId || res
+        );
+        this.processSubmitDialogFlag = true;
+
+        this.$nextTick(() => {
+          let params = {
+            businessId: this.businessId || res,
+            businessKey: 'sales_sendconfirm_approve',
+            formCreateUserId: data.createUserId,
+            variables: {
+              businessCode: data.docNo,
+              businessName: data.contactName,
+              businessType: '发货确认单'
+            }
+          };
+
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
+      remove(index) {
+        this.form.productList.splice(index, 1);
+      },
+      reload() {
+        this.cancel();
+        this.$emit('done');
+      },
+      cancel() {
+        this.$nextTick(() => {
+          // 关闭后,销毁所有的表单数据
+          this.form = formDef;
+          this.visible = false;
+        });
+      }
+    }
+  };
+</script>
+<style scoped lang="scss">
+  .TotalAmount {
+    font-size: 16px;
+    padding-right: 30px;
+  }
+
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
+  }
+</style>

+ 93 - 0
src/views/purchasingManage/purchaseOrder/invoiceConfirm/components/searchTable.vue

@@ -0,0 +1,93 @@
+<!-- 搜索表单 -->
+<template>
+  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
+</template>
+<script>
+  import { reviewStatusSelect } from '@/enum/dict';
+export default {
+  data() {
+    return {};
+  },
+  computed: {
+    // 表格列配置
+    seekList() {
+      return [
+        {
+          label: '关键字:',
+          value: 'searchName',
+          type: 'input',
+          placeholder: '收货单编码/采购订单编码/送货单号/产品名称'
+        },
+        {
+          label: '收货单编码:',
+          value: 'receiveNo',
+          type: 'input',
+          placeholder: '请输入'
+        },
+        {
+          label: '采购订单编码:',
+          value: 'orderNo',
+          type: 'input',
+          placeholder: '请输入',
+        },
+        {
+          label: '采购订单类型:',
+          value: 'sourceTypeName',
+          labelWidth:130,
+          width: 360,
+          type: 'input',
+          placeholder: '请输入',
+        },
+        {
+          label: '产品名称:',
+          value: 'productName',
+          width: 380,
+          type: 'input',
+          placeholder: '请输入',
+        },
+        {
+          label: '供应商名称:',
+          value: 'supplierName',
+          labelWidth:130,
+          width: 360,
+          type: 'input',
+          placeholder: '请输入',
+        },
+        {
+          label: '送货单号:',
+          value: 'sendNoteNo',
+          width: 380,
+          type: 'input',
+          placeholder: '请输入'
+        },
+      
+        {
+          label: '状态:',
+          value: 'reviewStatus',
+          width: 380,
+          type: 'select',
+          placeholder: '请选择状态',
+          planList: reviewStatusSelect
+        },
+        {
+          label: '创建时间:',
+          value: 'createTime',
+          type: 'date',
+          dateType: 'datetimerange',
+          placeholder: '',
+          width: 380,
+          valueAr: ['createTimeStart', 'createTimeEnd']
+        },
+      ];
+    }
+  },
+  methods: {
+    /* 搜索 */
+    search(e) {
+      this.$emit('search', {
+        ...e
+      });
+    }
+  }
+};
+</script>

+ 399 - 0
src/views/purchasingManage/purchaseOrder/invoiceConfirm/index.vue

@@ -0,0 +1,399 @@
+<template>
+  <div class="ele-body" style="width: 100%">
+    <el-card shadow="never" v-loading="loading" style="width: 100%">
+      <div class="ele-border-lighter form-content" v-loading="loading">
+        <search-table @search="reload"></search-table>
+
+        <!-- 数据表格 -->
+        <ele-pro-table
+          ref="table"
+          :columns="columns"
+          :datasource="datasource"
+          height="calc(100vh - 410px)"
+          style="margin-bottom: 10px"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :selection.sync="selection"
+          :page-size="20"
+          @columns-change="handleColumnChange"
+          :cache-key="cacheKeyUrl"
+        >
+          <!-- 表头工具栏 -->
+          <template v-slot:toolbar>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              class="ele-btn-icon"
+              @click="openEdit('add', {})"
+              v-if="$hasPermission('eom:purchasereceiveconfirm:save')"
+            >
+              新建
+            </el-button>
+          </template>
+
+          <!-- 查看详情列 -->
+
+          <template v-slot:receiveConfirmNo="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="receiveConfirmNo(row, 'receiveConfirmNo')"
+            >
+              {{ row.receiveConfirmNo }}
+            </el-link>
+          </template>
+          <template v-slot:receiveCode="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="openorderDetail(row, 'receiveCode')"
+            >
+              {{ row.receiveCode }}
+            </el-link>
+          </template>
+          <template v-slot:orderNo="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="openorderDetail(row, 'orderNo')"
+            >
+              {{ row.orderNo }}
+            </el-link>
+          </template>
+          <!-- 操作列 -->
+          <template v-slot:action="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-edit"
+              @click="openEdit('edit', row)"
+              v-if="
+                [0, 3].includes(row.reviewStatus) &&
+                $hasPermission('eom:purchasereceiveconfirm:update')
+              "
+            >
+              修改
+            </el-link>
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-plus"
+              @click="sendSubmit(row)"
+              v-if="
+                [0, 3].includes(row.reviewStatus) &&
+                $hasPermission('eom:purchasereceiveconfirm:update')
+              "
+            >
+              提交
+            </el-link>
+
+            <el-popconfirm
+              class="ele-action"
+              title="确定要删除此信息吗?"
+              @confirm="remove([row.id])"
+              v-if="
+                [0, 3].includes(row.reviewStatus) &&
+                $hasPermission('eom:purchasereceiveconfirm:delete')
+              "
+            >
+              <template v-slot:reference>
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
+                  删除
+                </el-link>
+              </template>
+            </el-popconfirm>
+          </template>
+        </ele-pro-table>
+      </div>
+    </el-card>
+
+    <invoice-detail-dialog ref="invoiceDetailDialogRef"></invoice-detail-dialog>
+    <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
+
+    <add-invoice-dialog
+      ref="invoiceDialogRef"
+      @done="reload"
+    ></add-invoice-dialog>
+
+    <!-- 多选删除弹窗 -->
+
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
+  </div>
+</template>
+
+<script>
+  import searchTable from './components/searchTable.vue';
+  import addInvoiceDialog from './components/addInvoiceDialog.vue';
+  import { reviewStatus } from '@/enum/dict';
+  import orderDetailDialog from '@/views/purchasingManage/purchaseOrder/components/detailDialog.vue';
+  import invoiceDetailDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue';
+  import dictMixins from '@/mixins/dictMixins';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import {
+    getPurchasereceiveconfirmList,
+    deleteReceiveConfirmInformation
+  } from '@/api/purchasingManage/invoiceConfirm';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
+  export default {
+    mixins: [dictMixins, tabMixins],
+    components: {
+      processSubmitDialog,
+      searchTable,
+      addInvoiceDialog,
+      orderDetailDialog,
+      invoiceDetailDialog
+    },
+
+    data() {
+      return {
+        selection: [], //单选中集合
+        delVisible: false, //批量删除弹框状态
+        loading: false, // 加载状态
+        processSubmitDialogFlag: false,
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'receiveConfirmNo',
+            label: '收货确认单单编码',
+            sortable: true,
+            align: 'center',
+            slot: 'receiveConfirmNo',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'receiveCode',
+            label: '收货单编码',
+            sortable: true,
+            align: 'center',
+            slot: 'receiveCode',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          // {
+          //   prop: 'orderNo',
+          //   label: '采购订单编码',
+          //   sortable: true,
+          //   align: 'center',
+          //   slot: 'orderNo',
+          //   showOverflowTooltip: true,
+          //   minWidth: 180
+          // },
+          {
+            prop: 'sourceTypeName',
+            label: '采购订单类型',
+            sortable: true,
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'productCodes',
+            label: '产品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160
+          },
+          {
+            prop: 'batchNos',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'productCount',
+            label: '数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+
+          {
+            prop: 'supplierName',
+            label: '供应商名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 300
+          },
+          {
+            prop: 'sendNoteNo',
+            label: '送货单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          // {
+          //   prop: 'replied',
+          //   label: '是否回执',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 200,
+          //   formatter: (_row, _column, cellValue) => {
+          //   return _row.replied==1?'是':'否';
+          // }
+          // },
+          {
+            prop: 'reviewStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.reviewStatus];
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 280,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        cacheKeyUrl: 'eos-436e7400-purchasingManage-invoiceConfirm'
+      };
+    },
+    computed: {},
+
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getPurchasereceiveconfirmList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+
+      //新增编辑
+      openEdit(type, row) {
+        this.$refs.invoiceDialogRef.open(type, row);
+        this.$refs.invoiceDialogRef.$refs.form &&
+          this.$refs.invoiceDialogRef.$refs.form.clearValidate();
+      },
+
+      //删除接口
+      remove(delData) {
+        deleteReceiveConfirmInformation(delData).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+
+      sendSubmit(res) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: res.id,
+            businessKey: 'sales_sendconfirm_approve',
+            formCreateUserId: res.createUserId,
+            variables: {
+              businessCode: res.receiveConfirmNo,
+              businessName: res.contactName,
+              businessType: '收货确认单'
+            }
+          };
+
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
+      //查看详情
+      openorderDetail(row, type) {
+        if (type === 'receiveCode') {
+          this.$refs.invoiceDetailDialogRef.open({id:row.receiveId});
+        }
+        if (type === 'orderNo') {
+          this.$refs.orderDetailDialogRef.open({ id: row.orderId });
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .ele-body {
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+
+  :deep .el-card__body {
+    padding: 0;
+  }
+
+  :deep(.el-link--inner) {
+    margin-left: 0px !important;
+  }
+
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+
+  .switch_left ul .active {
+    border-top: 4px solid var(--color-primary);
+    color: var(--color-primary-5);
+  }
+
+  .switch {
+    padding-bottom: 20px;
+  }
+
+  .el-dropdown-link {
+    cursor: pointer;
+    color: var(--color-primary-5);
+  }
+
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+</style>

+ 352 - 326
src/views/saleManage/saleOrder/customerReturnOrder/index.vue

@@ -25,7 +25,7 @@
               type="primary"
               icon="el-icon-plus"
               class="ele-btn-icon"
-              @click="handleAddOrEdit('add' )"
+              @click="handleAddOrEdit('add')"
             >
               新建
             </el-button>
@@ -51,8 +51,7 @@
               @click="openorderDetail(row, 'returnNo')"
             >
               {{ row.returnHandleNo }}
-            </el-link
-            >
+            </el-link>
           </template>
           <template v-slot:returnNo="{ row }">
             <el-link
@@ -61,18 +60,20 @@
               @click="openorderDetail(row, 'returnNo')"
             >
               {{ row.returnNo }}
-            </el-link
-            >
+            </el-link>
           </template>
           <template v-slot:orderNo="{ row }">
             <el-link
               type="primary"
               :underline="false"
-              @click="openorderDetail(row, 'orderNo')"
-            >
-              {{ row.orderNo }}
-            </el-link
+              v-for="(v, j) in row.orderNo.split(',')"
+              :key="v"
+              @click="openorderDetail(row, 'orderNo', j)"
             >
+              {{ v }}
+
+              <span v-if="j != row.orderNo.split(',').length - 1">,</span>
+            </el-link>
           </template>
           <!-- 操作列 -->
           <template v-slot:action="{ row }">
@@ -81,7 +82,8 @@
               :underline="false"
               icon="el-icon-edit"
               @click="handleAddOrEdit('update', row)"
-              v-if="[0,3].includes(row.approvalStatus)">
+              v-if="[0, 3].includes(row.approvalStatus)"
+            >
               修改
             </el-link>
             <el-link
@@ -89,7 +91,9 @@
               :underline="false"
               icon="el-icon-plus"
               @click="returnSubmit(row)"
-              v-if="isNeed_process_is_close&&[0, 3].includes(row.approvalStatus)"
+              v-if="
+                isNeed_process_is_close && [0, 3].includes(row.approvalStatus)
+              "
             >
               提交
             </el-link>
@@ -105,7 +109,11 @@
             <el-popconfirm
               class="ele-action"
               title="确定要删除此信息吗?"
-              v-if="(isNeed_process_is_close&&[0, 3].includes(row.approvalStatus))||!isNeed_process_is_close"
+              v-if="
+                (isNeed_process_is_close &&
+                  [0, 3].includes(row.approvalStatus)) ||
+                !isNeed_process_is_close
+              "
               @confirm="remove([row.id])"
             >
               <template v-slot:reference>
@@ -119,16 +127,18 @@
       </div>
     </el-card>
 
-
     <send-detail-dialog ref="sendDetailDialogRef"></send-detail-dialog>
     <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
 
     <!--  客户真实退货单  -->
-    <add-or-edit-dialog :add-or-edit-dialog-flag.sync="addOrEditDialogFlag" ref="addOrEditDialogRef"
-                        v-if="addOrEditDialogFlag" @done="reload"></add-or-edit-dialog>
+    <add-or-edit-dialog
+      :add-or-edit-dialog-flag.sync="addOrEditDialogFlag"
+      ref="addOrEditDialogRef"
+      v-if="addOrEditDialogFlag"
+      @done="reload"
+    ></add-or-edit-dialog>
     <!--详情-->
-    <detail-dialog ref="DetailDialogRef"
-    ></detail-dialog>
+    <detail-dialog ref="DetailDialogRef"></detail-dialog>
     <!-- 多选删除弹窗 -->
     <pop-modal
       :visible.sync="delVisible"
@@ -136,132 +146,139 @@
       @done="commitBtn"
     />
     <!--发货单    -->
-    <add-sale-order-dialog v-if="addSaleOrderDialogFlag" :addSaleOrderDialogFlag.sync="addSaleOrderDialogFlag"
-                           ref="addSaleOrderDialogRef" @done="reload"></add-sale-order-dialog>
-    <process-submit-dialog :isNotNeedProcess="false" :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
-
+    <add-sale-order-dialog
+      v-if="addSaleOrderDialogFlag"
+      :addSaleOrderDialogFlag.sync="addSaleOrderDialogFlag"
+      ref="addSaleOrderDialogRef"
+      @done="reload"
+    ></add-sale-order-dialog>
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </div>
 </template>
 
 <script>
+  import sendDetailDialog from '@/views/saleManage/saleOrder/invoice/components/detailDialog.vue';
+  import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
+  import popModal from '@/components/pop-modal';
+  import addOrEditDialog from '@/views/saleManage/saleOrder/customerReturnOrder/addOrEditDialog.vue';
+  import { reviewStatus } from '@/enum/dict';
+  import searchTablePage from '@/views/saleManage/saleOrder/customerReturnOrder/searchTable-page.vue';
+  import detailDialog from '../returnGoods/components/detailDialog.vue';
+  import addSaleOrderDialog from '@/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue';
+  import {
+    saleReturnPageList,
+    deleteSaleReturnAPI,
+    salesOrderReturnSubmit
+  } from '@/api/saleManage/returnGoods';
+  import dictMixins from '@/mixins/dictMixins';
+  import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue';
+  import AddSaleOrderDialog from '@/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
+  export default {
+    mixins: [dictMixins, tabMixins],
+    components: {
+      processSubmitDialog,
+      AddSaleOrderDialog,
+      addReturnGoodsDialog,
+      sendDetailDialog,
+      orderDetailDialog,
+      popModal,
+      addOrEditDialog,
+      searchTablePage,
+      detailDialog
+    },
+    data() {
+      return {
+        selection: [], //单选中集合
+        delVisible: false, //批量删除弹框状态
+        loading: false, // 加载状态
+        addOrEditDialogFlag: false, // 客户真实退货单
+        detailDialogFlag: false, // 客户真实退货单详情
+        addSaleOrderDialogFlag: false, // 新增发货单
+        processSubmitDialogFlag: false,
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'returnHandleNo',
+            label: '退货处理单编码',
+            align: 'center',
+            slot: 'returnHandleNo',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200
+          },
+          {
+            prop: 'returnNo',
+            label: '退货单编码',
+            align: 'center',
+            slot: 'returnNo',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200
+          },
 
-import sendDetailDialog from '@/views/saleManage/saleOrder/invoice/components/detailDialog.vue';
-import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
-import popModal from '@/components/pop-modal';
-import addOrEditDialog from "@/views/saleManage/saleOrder/customerReturnOrder/addOrEditDialog.vue";
-import {reviewStatus} from '@/enum/dict';
-import searchTablePage from "@/views/saleManage/saleOrder/customerReturnOrder/searchTable-page.vue";
-import detailDialog from "../returnGoods/components/detailDialog.vue";
-import addSaleOrderDialog from "@/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue";
-import {
-  saleReturnPageList,
-  deleteSaleReturnAPI,
-  salesOrderReturnSubmit
-} from '@/api/saleManage/returnGoods';
-import dictMixins from '@/mixins/dictMixins';
-import addReturnGoodsDialog from "@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue";
-import AddSaleOrderDialog from "@/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue";
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-import tabMixins from '@/mixins/tableColumnsMixin';
-
-export default {
-  mixins: [dictMixins,tabMixins],
-  components: {
-    processSubmitDialog,
-    AddSaleOrderDialog,
-    addReturnGoodsDialog,
-    sendDetailDialog,
-    orderDetailDialog,
-    popModal,
-    addOrEditDialog,
-    searchTablePage,
-    detailDialog
-  },
-  data() {
-    return {
-
-      selection: [], //单选中集合
-      delVisible: false, //批量删除弹框状态
-      loading: false, // 加载状态
-      addOrEditDialogFlag: false, // 客户真实退货单
-      detailDialogFlag: false, // 客户真实退货单详情
-      addSaleOrderDialogFlag: false, // 新增发货单
-      processSubmitDialogFlag: false,
-      columns: [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'returnHandleNo',
-          label: '退货处理单编码',
-          align: 'center',
-          slot: 'returnHandleNo',
-          showOverflowTooltip: true,
-          sortable: true,
-          minWidth: 200
-        },
-        {
-          prop: 'returnNo',
-          label: '退货单编码',
-          align: 'center',
-          slot: 'returnNo',
-          showOverflowTooltip: true,
-          sortable: true,
-          minWidth: 200
-        },
-
-        {
-          prop: 'orderNo',
-          label: '销售订单编码',
-          align: 'center',
-          slot: 'orderNo',
-          showOverflowTooltip: true,
-          sortable: true,
-          minWidth: 200
-        },
-        {
-          prop: 'sendNo',
-          label: '发货订单编码',
-          align: 'center',
-          slot: 'sendNo',
-          showOverflowTooltip: true,
-          sortable: true,
-          minWidth: 200
-        },
-        {
-          prop: 'productNames',
-          label: '产品名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
+          {
+            prop: 'orderNo',
+            label: '销售订单编码',
+            align: 'center',
+            slot: 'orderNo',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200
+          },
+          {
+            prop: 'sendNo',
+            label: '发货订单编码',
+            align: 'center',
+            slot: 'sendNo',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200
+          },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
             prop: 'productCodes',
             label: '产品编码',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 160
           },
-        {
-          prop: 'batchNos',
-          label: '批次号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
+          {
+            prop: 'batchNos',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
             prop: 'productCount',
             label: '数量',
             align: 'center',
@@ -269,218 +286,227 @@ export default {
             minWidth: 140
           },
 
-        {
-          prop: 'contactName',
-          label: '客户名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 180
-        },
-        // {
-        //   prop: 'contactName2',
-        //   label: '已返修数量',
-        //   align: 'center',
-        //   showOverflowTooltip: true,
-        //   minWidth: 180
-        // },
-        // {
-        //   prop: 'contactName1',
-        //   label: '未返修数量',
-        //   align: 'center',
-        //   showOverflowTooltip: true,
-        //   minWidth: 180
-        // },
-        {
-          prop: 'approvalStatus',
-          label: '状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatus[_row.approvalStatus];
+          {
+            prop: 'contactName',
+            label: '客户名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          // {
+          //   prop: 'contactName2',
+          //   label: '已返修数量',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 180
+          // },
+          // {
+          //   prop: 'contactName1',
+          //   label: '未返修数量',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 180
+          // },
+          {
+            prop: 'approvalStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.approvalStatus];
+            }
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 80
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 230,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
           }
-        },
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 80,
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 170
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 230,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ],
-      cacheKeyUrl:'eos-62240a29-saleManage-customerReturnOrder'
-    };
-  },
-  computed: {},
-
-  methods: {
-    /* 表格数据源 */
-    datasource({page, limit, where, order}) {
-      return saleReturnPageList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({page: 1, where});
-    },
-
-    //创建/修改客户退货单
-    handleAddOrEdit(type, row) {
-      this.addOrEditDialogFlag = true
-      this.$nextTick(() => {
-        this.$refs.addOrEditDialogRef.init(type, row)
-      })
-    },
-
-    //批量删除
-    allDelBtn() {
-      if (this.selection.length === 0) return;
-      let flag = this.selection.some(item => [1, 2].includes(item.approvalStatus))
-      if (flag) return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查')
-      this.delVisible = true;
-    },
-
-    //删除接口
-    remove(delData) {
-      deleteSaleReturnAPI(delData).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
-
-    //删除弹框确定
-    commitBtn() {
-      const dataId = this.selection.map((v) => v.id);
-      this.remove(dataId);
+        ],
+        cacheKeyUrl: 'eos-62240a29-saleManage-customerReturnOrder'
+      };
     },
-    returnSubmit(res) {
-      this.processSubmitDialogFlag = true
-      this.$nextTick(()=>{
-        let params = {
-          businessId:res.id,
-          businessKey : 'sales_return_handle_approve_new',
-          formCreateUserId: res.createUserId,
-          variables: {
-            businessCode: res.returnHandleNo,
-            businessName: res.contactName,
+    computed: {},
+
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return saleReturnPageList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+
+      //创建/修改客户退货单
+      handleAddOrEdit(type, row) {
+        this.addOrEditDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addOrEditDialogRef.init(type, row);
+        });
+      },
+
+      //批量删除
+      allDelBtn() {
+        if (this.selection.length === 0) return;
+        let flag = this.selection.some((item) =>
+          [1, 2].includes(item.approvalStatus)
+        );
+        if (flag)
+          return this.$message.warning(
+            '抱歉已审核、审核中的数据不能删除,请检查'
+          );
+        this.delVisible = true;
+      },
+
+      //删除接口
+      remove(delData) {
+        deleteSaleReturnAPI(delData).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+
+      //删除弹框确定
+      commitBtn() {
+        const dataId = this.selection.map((v) => v.id);
+        this.remove(dataId);
+      },
+      returnSubmit(res) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: res.id,
+            businessKey: 'sales_return_handle_approve_new',
+            formCreateUserId: res.createUserId,
+            variables: {
+              businessCode: res.returnHandleNo,
+              businessName: res.contactName,
               businessType: '售后退货处理单'
-          },
-          // callBackMethodType : '1',
-          // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-          // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-          // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-          // miniHandle : '',
-          // miniView : '',
+            }
+            // callBackMethodType : '1',
+            // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
+            // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
+            // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
+            // miniHandle : '',
+            // miniView : '',
+          };
+
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+        // salesOrderReturnSubmit({
+        //   businessId: res.id
+        // }).then((res) => {
+        //   this.$message.success('提交成功!');
+        //   this.reload();
+        // });
+      },
+      handleAddSaleOrder(row) {
+        this.addSaleOrderDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addSaleOrderDialogRef.init({ ...row });
+        });
+      },
+      //查看详情
+      openorderDetail(row, type) {
+        if (type === 'returnNo') {
+          let params = {
+            handleReceiptId: row.id,
+            id: row.returnRecordId,
+            type: '10'
+          };
+          this.$refs.DetailDialogRef.open(params);
+          // this.detailDialogFlag = true
+          // this.$nextTick(() => {
+          //   this.$refs.detailDialogRef.init('view', row)
+          // })
         }
-
-
-        this.$refs.processSubmitDialogRef.init(params)
-      })
-      // salesOrderReturnSubmit({
-      //   businessId: res.id
-      // }).then((res) => {
-      //   this.$message.success('提交成功!');
-      //   this.reload();
-      // });
-    },
-    handleAddSaleOrder(row) {
-      this.addSaleOrderDialogFlag = true
-      this.$nextTick(() => {
-        this.$refs.addSaleOrderDialogRef.init({...row})
-      })
-    },
-    //查看详情
-    openorderDetail(row, type) {
-      if (type === 'returnNo') {
-        let params = {
-          handleReceiptId: row.id,
-          id: row.returnRecordId,
-          type: '10'
-
+        if (type === 'sendNo') {
+          this.$refs.sendDetailDialogRef.open({ id: row.sendId });
+        }
+        if (type === 'orderNo') {
+          let orderId = '';
+          if (row.orderIds) {
+            orderId = row.orderIds.split(',')[index];
+          } else {
+            orderId = row.orderId;
+          }
+          this.$refs.orderDetailDialogRef.open({ id: orderId });
         }
-        this.$refs.DetailDialogRef.open(params);
-        // this.detailDialogFlag = true
-        // this.$nextTick(() => {
-        //   this.$refs.detailDialogRef.init('view', row)
-        // })
-      }
-      if (type === 'sendNo') {
-        this.$refs.sendDetailDialogRef.open({id: row.sendId});
-      }
-      if (type === 'orderNo') {
-        this.$refs.orderDetailDialogRef.open({id: row.orderId});
       }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.ele-body {
-  padding-top: 0;
-  padding-bottom: 0;
-}
+  .ele-body {
+    padding-top: 0;
+    padding-bottom: 0;
+  }
 
-:deep .el-card__body {
-  padding: 0;
-}
+  :deep .el-card__body {
+    padding: 0;
+  }
 
-:deep(.el-link--inner) {
-  margin-left: 0px !important;
-}
+  :deep(.el-link--inner) {
+    margin-left: 0px !important;
+  }
 
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 40px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  & > .el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 
-.switch_left ul .active {
-  border-top: 4px solid var(--color-primary);
-  color: var(--color-primary-5);
-}
+  .switch_left ul .active {
+    border-top: 4px solid var(--color-primary);
+    color: var(--color-primary-5);
+  }
 
-.switch {
-  padding-bottom: 20px;
-}
+  .switch {
+    padding-bottom: 20px;
+  }
 
-.el-dropdown-link {
-  cursor: pointer;
-  color: var(--color-primary-5);
-}
+  .el-dropdown-link {
+    cursor: pointer;
+    color: var(--color-primary-5);
+  }
 
-.el-icon-arrow-down {
-  font-size: 12px;
-}
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
 </style>

+ 48 - 21
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -74,13 +74,25 @@
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.totalCount'"
           :rules="[
-            { required: true, message: '请输入本次收货数量', trigger: 'blur' },
-            { validator: validateTotalCount(scope.row), trigger: 'blur' }
+            { required: true, message: '请输入本次收货数量', trigger: 'blur' }
           ]"
         >
-          <!--           { validator: validateTotalCount(scope.row), trigger: 'blur' }-->
           <el-input
             v-model="scope.row.totalCount"
+            type="number"
+            @input="(val) => changeNum(val, scope.row, scope.$index)"
+          ></el-input>
+        </el-form-item>
+      </template>
+      <template v-slot:singlePrice="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.singlePrice'"
+          :rules="[{ required: true, message: '请输入单价', trigger: 'blur' }]"
+        >
+          <el-input
+            v-model="scope.row.singlePrice"
+            type="number"
             @input="(val) => changeNum(val, scope.row, scope.$index)"
           ></el-input>
         </el-form-item>
@@ -103,6 +115,34 @@
           </el-select>
         </el-form-item>
       </template>
+      <template v-slot:produceDeliveryDeadline="scope">
+        <el-form-item
+          :prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
+        >
+          <el-date-picker
+            style="width: 140px"
+            v-model="scope.row.produceDeliveryDeadline"
+            type="date"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </template>
+      <template v-slot:customerExpectDeliveryDeadline="scope">
+        <el-form-item
+          :prop="
+            'datasource.' + scope.$index + '.customerExpectDeliveryDeadline'
+          "
+        >
+          <el-date-picker
+            style="width: 140px"
+            v-model="scope.row.customerExpectDeliveryDeadline"
+            type="date"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </template>
       <template v-slot:warehouseNum="scope">
         <el-form-item style="margin-bottom: 20px">
           {{ scope.row.warehouseNum }}
@@ -276,7 +316,7 @@
             align: 'center'
           },
           {
-            width: 120,
+            width: 150,
             prop: 'totalCount',
             label: '本次收货数量',
             slot: 'totalCount',
@@ -318,22 +358,9 @@
             slot: 'weightUnit',
             align: 'center'
           },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1
-          //       ? '按数量计费'
-          //       : row.pricingWay == 2
-          //       ? '按重量计费'
-          //       : '';
-          //   }
-          // },
+
           {
-            width: 80,
+            width: 150,
             prop: 'singlePrice',
             label: '单价',
             slot: 'singlePrice',
@@ -394,7 +421,7 @@
           //   show: this.isDeliveryDeadline
           // },
           {
-            minWidth: 140,
+            minWidth: 170,
             prop: 'customerExpectDeliveryDeadline',
             label: '客户期望交期',
             slot: 'customerExpectDeliveryDeadline',
@@ -402,7 +429,7 @@
             align: 'center'
           },
           {
-            minWidth: 140,
+            minWidth: 170,
             prop: 'produceDeliveryDeadline',
             label: '生产交付交期',
             slot: 'produceDeliveryDeadline',

+ 9 - 7
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -1238,6 +1238,13 @@
         if (data) {
           this.form.datasource = data;
           data.forEach(async (item, index) => {
+            this.$set(
+              this.form.datasource[index],
+              'warehouseList',
+              await getIdWarehouseList({
+                categoryId: item.productId
+              })
+            );
             if (item.warehouseId) {
               this.$set(
                 this.form.datasource[index],
@@ -1247,14 +1254,9 @@
                   code: item.productCode
                 })
               );
+            } else if (this.form.datasource[index]?.warehouseList?.length) {
+              
             }
-            this.$set(
-              this.form.datasource[index],
-              'warehouseList',
-              await getIdWarehouseList({
-                categoryId: item.productId
-              })
-            );
 
             //保存初始收货总重
             this.oldReceiveTotalWeight = this.form.datasource.map((item) => {

+ 6 - 7
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -146,13 +146,6 @@
               <template slot="append">元</template>
             </el-input>
           </template>
-          <template v-slot:remark="scope">
-            <el-input
-              v-model="scope.row.remark"
-              placeholder="请输入"
-            >
-            </el-input>
-          </template>
           <template v-slot:totalCount="scope">
             <el-input
               v-model="scope.row.totalCount"
@@ -161,6 +154,12 @@
               placeholder="请输入"
             ></el-input>
           </template>
+          <template v-slot:remark="scope">
+            <el-input
+              v-model="scope.row.remark"
+              placeholder="请输入"
+            ></el-input>
+          </template>
         </ele-pro-table>
       </el-tab-pane>
 

+ 0 - 149
src/views/targetManage/salesRegulation/components/orgTree.vue

@@ -1,149 +0,0 @@
-<template>
-    <ele-modal
-      custom-class="ele-dialog-form long-dialog-form"
-      :centered="true"
-      :visible.sync="addOrEditDialogFlag"
-      :title="title"
-      :append-to-body="false"
-      :close-on-click-modal="false"
-      width="60%"
-      :before-close="cancel"
-      :maxable="true"
-    :resizable="true"
-    >
-      <vue2-org-tree
-        name="test"
-        :data="data"
-        :collapsable="true"
-        horizontal="horizontal"
-        :render-content="renderContent"
-        @on-expand="onExpand"
-        @on-node-click="onNodeClick"
-      />
-    </ele-modal>
-  </template>
-  <script>
-  import { mapGetters } from 'vuex';
-
-  
-  export default {
-    name: 'add-or-edit-dialog',
-    components: {},
-    props: {
-      addOrEditDialogFlag: {
-        type: Boolean,
-        default: false
-      }
-    },
-    computed: {
-      ...mapGetters(['user'])
-    },
-    data() {
-      return {
-        data: {
-       
-        },
-  
-        dialogType: '',
-        title: '',
-        form: {
-          account: '',
-          bankName: '',
-          branchName: '',
-          createTime: '',
-          enabled: 1,
-          id: '',
-          remark: '',
-          type: undefined
-        },
-        feeTypeList: [],
-        accountingSubjectList: [],
-        deptList: [],
-        deptTreeList: [],
-        rules: {
-          type: { required: true, message: '请选择', trigger: 'change' },
-          enabled: { required: true, message: '请选择', trigger: 'change' }
-        }
-      };
-    },
-    created() {},
-    methods: {
-      renderContent(h, data) {
-        return (
-        
-          <div class="sss">
-             <span class={data.type==1?'zaz':'ddd'}>{data.type==1?'公司':'部门'}</span>
-            {data.label}</div>
-        );
-      },
-      //初始化
-      async init(row = {}, type) {
-        this.title = type == 'add' ? '新增' : '修改';
-        this.dialogType = type;
-        if (type !== 'add') {
-          await this.getFeeApplyInfoInfo(row.id);
-        }
-      },
-      //获取详情
-      async getFeeApplyInfoInfo(id) {
-        this.form = await getSettlementAccountInfoAPI(id);
-      },
-      onExpand(e, data) {
-        if ('expand' in data) {
-          data.expand = !data.expand;
-          if (!data.expand && data.children) {
-            this.collapse(data.children);
-          }
-        } else {
-          this.$set(data, 'expand', true);
-        }
-      },
-      //点击选项执行的方法,可以用于跳转到其他链接,注意一定要写协议头
-      onNodeClick(e, data) {
-        //console.log(data.label);
-        if (data.url == null) {
-          return false;
-        } else {
-          window.open(data.url);
-        }
-      },
-  
-      handleSave(flag) {
-        this.$refs.form.validate(async (valid) => {
-          if (!valid) return this.$message.warning('有必填项未填,请检查');
-          const API =
-            this.dialogType == 'add'
-              ? settlementAccountSaveAPI
-              : settlementAccountUpdateAPI;
-          const id = await API(this.form);
-          if (flag) {
-            await this.handleSub(id);
-          }
-          this.$message.success('操作成功');
-          this.done();
-          this.cancel();
-        });
-      },
-      //提交-开启流程
-      async handleSub(id) {
-        try {
-          await settlementAccountSubmit({ businessId: id });
-        } catch (e) {
-          this.$message.error(e.message);
-        }
-      },
-      //刷新主列表数据
-      done() {
-        this.$emit('reload');
-      },
-      //关闭弹窗
-      cancel() {
-        this.$emit('update:addOrEditDialogFlag', false);
-      }
-    }
-  };
-  </script>
-  <style scoped lang="scss">
-  @import '~vue2-org-tree/dist/style.css';
-  </style>
-