yusheng hai 1 ano
pai
achega
90a4b0272a

+ 2 - 2
src/BIZComponents/inventoryTable.vue

@@ -189,7 +189,7 @@
               style="margin-bottom: 20px"
               :prop="'datasource.' + scope.$index + '.guaranteePeriod'"
               :rules="{
-                required: contractBookType == 1 ? true : false,
+
                 pattern: numberReg,
                 message: '请输入质保期',
                 trigger: 'blur'
@@ -843,7 +843,7 @@
             prop: 'guaranteePeriod',
             label: '质保期',
             slot: 'guaranteePeriod',
-            headerSlot: 'headerCustomerExpectDeliveryDeadline',
+            // headerSlot: 'headerCustomerExpectDeliveryDeadline',
             align: 'center'
           },
           {

+ 285 - 215
src/views/bpm/handleTask/components/financialManage/invoiceManage/components/addOrEditDialog.vue

@@ -8,21 +8,62 @@
             <el-form-item
               label="发票类型"
               prop="type"
-              style="margin-bottom: 22px">
-              <el-select v-model="form.type" @change="handleSelType" disabled clearable style="width: 100%">
+              
+            >
+              <el-select
+                v-model="form.type"
+                @change="handleSelType"
+                disabled
+                clearable
+                style="width: 100%"
+              >
                 <el-option label="开票" :value="1"></el-option>
                 <el-option label="收票" :value="2"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="来源类型" prop="sourceType">
+              <el-select
+                v-model="form.sourceType"
+                :disabled="true"
+                style="width: 100%"
+              >
+                <el-option label="对账单" :value="1"></el-option>
+                <el-option label="合同" :value="2"></el-option>
+                <el-option label="订单" :value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 1">
+            <el-form-item label="对账单" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 2">
+            <el-form-item label="合同" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 3">
+            <el-form-item label="订单" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item
               label="金额"
               prop="amount"
-              style="margin-bottom: 22px">
-              <el-input-number v-model="form.amount" :precision="2" :disabled="taskDefinitionKey!='starter'"
-                               :controls="false" style="width: 100%"
-                               :min="0"></el-input-number>
+              
+            >
+              <el-input-number
+                v-model="form.amount"
+                :precision="2"
+                :disabled="taskDefinitionKey != 'starter'"
+                :controls="false"
+                style="width: 100%"
+                :min="0"
+              ></el-input-number>
             </el-form-item>
           </el-col>
         </el-row>
@@ -30,10 +71,10 @@
           <el-form-item
             label="申请部门"
             prop="applyDeptId"
-            style="margin-bottom: 22px"
+            
           >
             <ele-tree-select
-              :disabled="taskDefinitionKey!='starter'"
+              :disabled="taskDefinitionKey != 'starter'"
               clearable
               :data="deptTreeList"
               v-model="form.applyDeptId"
@@ -49,38 +90,35 @@
           <el-form-item
             label="申请人"
             prop="applyUserId"
-            style="margin-bottom: 22px"
+            
           >
             <personSelect
-              :disabled="taskDefinitionKey!='starter'"
+              :disabled="taskDefinitionKey != 'starter'"
               ref="directorRef"
               v-model="form.applyUserId"
               @selfChange="changeUserInfo"
             />
           </el-form-item>
         </el-col>
-      </el-row>
-
-      <el-row :gutter="12">
+ 
         <el-col :span="12">
-          <el-form-item
-            label="预计开票日期"
-            style="margin-bottom: 22px">
+          <el-form-item label="预计开票日期" >
             <el-date-picker
-              :disabled="taskDefinitionKey!='starter'"
+              :disabled="taskDefinitionKey != 'starter'"
               style="width: 100%"
               v-model="form.expectInvoiceDate"
               type="date"
-              value-format="yyyy-MM-dd">
+              value-format="yyyy-MM-dd"
+            >
             </el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item
-            v-if="taskDefinitionKey!='starter'"
+            v-if="taskDefinitionKey != 'starter'"
             label="会计科目"
             prop="accountingSubjectId"
-            style="margin-bottom: 22px"
+            
           >
             <ele-tree-select
               clearable
@@ -96,17 +134,16 @@
             />
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="12" v-if="taskDefinitionKey!='starter'">
-        <el-col :span="12">
+
+        <el-col :span="12" :gutter="12" v-if="taskDefinitionKey != 'starter'">
           <el-form-item prop="files" label="发票附件">
-            <fileMain v-model="form.files" ></fileMain>
-<!--            <fileUpload-->
-<!--              v-model="form.files"-->
-<!--              module="main"-->
-<!--              :showLib="false"-->
-<!--              :limit="10"-->
-<!--            />-->
+            <fileMain v-model="form.files"></fileMain>
+            <!--            <fileUpload-->
+            <!--              v-model="form.files"-->
+            <!--              module="main"-->
+            <!--              :showLib="false"-->
+            <!--              :limit="10"-->
+            <!--            />-->
           </el-form-item>
         </el-col>
       </el-row>
@@ -116,40 +153,52 @@
           <el-form-item
             label="公司名称"
             prop="companyName"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyName" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyName"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item
             label="统一社会信用代码"
             prop="companyUsc"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyUsc" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyUsc"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
-
-
       </el-row>
       <el-row :gutter="12">
         <el-col :span="12">
           <el-form-item
             label="开户银行"
             prop="companyBankBranchNo"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyBankBranchNo" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyBankBranchNo"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-
           <el-form-item
             label="银行账户"
             prop="companyBankAccount"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyBankAccount" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyBankAccount"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
-
       </el-row>
 
       <el-row :gutter="12">
@@ -157,39 +206,52 @@
           <el-form-item
             label="单位地址"
             prop="companyAddress"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyAddress" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyAddress"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item
             label="电话号码"
             prop="companyTel"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.companyTel" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.companyTel"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
       <headerTitle title="收票信息"></headerTitle>
 
-
       <el-row :gutter="12">
         <el-col :span="12">
           <el-form-item
             label="收票人"
             prop="receiverName"
-            style="margin-bottom: 22px"
+            
           >
-            <el-input v-model="form.receiverName" :disabled="taskDefinitionKey!='starter'"></el-input>
+            <el-input
+              v-model="form.receiverName"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item
             label="收票人地址"
             prop="receiverAddress"
-            style="margin-bottom: 22px"
+            
           >
-            <el-input v-model="form.receiverAddress" :disabled="taskDefinitionKey!='starter'"></el-input>
+            <el-input
+              v-model="form.receiverAddress"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
@@ -198,186 +260,194 @@
           <el-form-item
             label="联系方式"
             prop="receiverTel"
-            style="margin-bottom: 22px">
-            <el-input v-model="form.receiverTel" :disabled="taskDefinitionKey!='starter'"></el-input>
+            
+          >
+            <el-input
+              v-model="form.receiverTel"
+              :disabled="taskDefinitionKey != 'starter'"
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <headerTitle title="关联信息"></headerTitle>
-    <table-info v-if="form.detailList.length" :dialogType="taskDefinitionKey!='starter'?'view':'update'"
-                :form="form" ref="table" @setPrice="setPrice"></table-info>
+    <table-info
+      v-if="form.detailList.length"
+      :dialogType="taskDefinitionKey != 'starter' ? 'view' : 'update'"
+      :form="form"
+      ref="table"
+      @setPrice="setPrice"
+    ></table-info>
   </div>
-
 </template>
 <script>
-import personSelect from "@/components/CommomSelect/person-select.vue";
-import {listOrganizations} from "@/api/system/organization";
-import {mapGetters} from "vuex";
-import fileUpload from "@/components/upload/fileUpload.vue";
-import tableInfo from "./tableInfo.vue";
-import {getTreeByPid} from "@/api/classifyManage";
-import {
-  invoiceApplyInfoAPI,
-  invoiceApplyUpdateAPI
-} from "@/api/bpm/components/financialManage/invoiceManage";
-import fileMain from "@/components/addDoc/index.vue";
-
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  import { listOrganizations } from '@/api/system/organization';
+  import { mapGetters } from 'vuex';
+  import fileUpload from '@/components/upload/fileUpload.vue';
+  import tableInfo from './tableInfo.vue';
+  import { getTreeByPid } from '@/api/classifyManage';
+  import {
+    invoiceApplyInfoAPI,
+    invoiceApplyUpdateAPI
+  } from '@/api/bpm/components/financialManage/invoiceManage';
+  import fileMain from '@/components/addDoc/index.vue';
 
-export default {
-  name: "add-or-edit-dialog",
-  components: {
-    fileMain,
-    fileUpload,
-    personSelect,
-    tableInfo
-  },
-  props: {
-    businessId: {
-      default: ''
+  export default {
+    name: 'add-or-edit-dialog',
+    components: {
+      fileMain,
+      fileUpload,
+      personSelect,
+      tableInfo
     },
-    taskDefinitionKey: {
-      default: ''
-    },
-  },
-  provide() {
-    return {
-      invoiceType: () => this.form.type
-    }
-  },
-  computed: {
-    ...mapGetters(['user'])
-  },
-  data() {
-    return {
-      dialogType: '',
-      title: '',
-      form: {
-        accountingSubjectCode: "",
-        accountingSubjectId: '',
-        accountingSubjectName: "",
-        amount: undefined,
-        applyDeptId: '',
-        applyDeptName: "",
-        applyUserId: '',
-        applyUserName: "",
-        companyAddress: "",
-        companyBankAccount: "",
-        companyUsc: "",
-        expectInvoiceDate: "",
-        companyBankBranchNo: "",
-        companyName: "",
-        receiverAddress: "",
-        receiverName: "",
-        receiverTel: "",
-        companyTel: "",
-        detailList: [],
-        drawerId: '',
-        drawerName: "",
-        files: [],
-        invoiceStatus: '',
-        link: [],
-        remark: "",
-        settlementAccountId: '',
-        settlementAccountName: "",
-        type: ''
+    props: {
+      businessId: {
+        default: ''
       },
-      feeTypeList: [],
-      accountingSubjectList: [],
-      deptList: [],
-      deptTreeList: [],
-      rules: {
-        applyDeptId: {required: true, message: '请选择', trigger: 'change'},
-        applyUserId: {required: true, message: '请选择', trigger: 'change'},
-        accountingSubjectId: {required: true, message: '请选择', trigger: 'change'},
-        feeTypeId: {required: true, message: '请选择', trigger: 'change'},
-        amount: {required: true, message: '请输入', trigger: 'blur'},
-        type: {required: true, message: '请选择', trigger: 'change'},
+      taskDefinitionKey: {
+        default: ''
       }
-    }
-  },
-  created() {
-    this.init()
-  },
-  methods: {
-    //初始化
-    async init() {
-      await this.getClassifyList(24, 'accountingSubjectList')
-      await this.getDeptList()
-      await this.getInfo(this.businessId)
-      this.$nextTick(async () => {
-        await this.getUserList(this.form.applyDeptId);
-      })
-    },
-    //获取详情
-    async getInfo(id) {
-      this.form = await invoiceApplyInfoAPI(id)
     },
-    //获取分类管理中的数据
-    async getClassifyList(id, listName) {
-      let res = await getTreeByPid(id)
-      this[listName] = res.data
+    provide() {
+      return {
+        invoiceType: () => this.form.type
+      };
     },
-    //获取会计科目选中数据
-    changeSubjectInfo(val) {
-      if (!val) return this.form.accountingSubjectName = ''
-      let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {}
-      this.form.accountingSubjectName = data.name
+    computed: {
+      ...mapGetters(['user'])
     },
-    // 获取部门数据
-    getDeptList() {
-      listOrganizations().then((list) => {
-        this.deptList = list;
-        this.deptTreeList = this.$util.toTreeData({
-          data: list,
-          idField: 'id',
-          parentIdField: 'parentId'
-        });
-      });
+    data() {
+      return {
+        dialogType: '',
+        title: '',
+        form: {
+          accountingSubjectCode: '',
+          accountingSubjectId: '',
+          accountingSubjectName: '',
+          amount: undefined,
+          applyDeptId: '',
+          applyDeptName: '',
+          applyUserId: '',
+          applyUserName: '',
+          companyAddress: '',
+          companyBankAccount: '',
+          companyUsc: '',
+          expectInvoiceDate: '',
+          companyBankBranchNo: '',
+          companyName: '',
+          receiverAddress: '',
+          receiverName: '',
+          receiverTel: '',
+          companyTel: '',
+          detailList: [],
+          drawerId: '',
+          drawerName: '',
+          files: [],
+          invoiceStatus: '',
+          link: [],
+          remark: '',
+          settlementAccountId: '',
+          settlementAccountName: '',
+          type: ''
+        },
+        feeTypeList: [],
+        accountingSubjectList: [],
+        deptList: [],
+        deptTreeList: [],
+        rules: {
+          applyDeptId: { required: true, message: '请选择', trigger: 'change' },
+          applyUserId: { required: true, message: '请选择', trigger: 'change' },
+          accountingSubjectId: {
+            required: true,
+            message: '请选择',
+            trigger: 'change'
+          },
+          feeTypeId: { required: true, message: '请选择', trigger: 'change' },
+          amount: { required: true, message: '请输入', trigger: 'blur' },
+          type: { required: true, message: '请选择', trigger: 'change' }
+        }
+      };
     },
-    // 选择负责人部门
-    changeDeptInfo(id) {
-      const info = this.deptList.find((e) => e.id == id) || {};
-      this.form.applyDeptName = info.name;
-      this.form.applyUserId = '';
-      this.form.applyUserName = '';
-      this.getUserList(id);
+    created() {
+      this.init();
     },
-    // 获取人员数据
-    getUserList(deptId) {
-      if (deptId) {
-        this.$refs.directorRef.getList({deptId});
+    methods: {
+      //初始化
+      async init() {
+        await this.getClassifyList(24, 'accountingSubjectList');
+        await this.getDeptList();
+        await this.getInfo(this.businessId);
+        this.$nextTick(async () => {
+          await this.getUserList(this.form.applyDeptId);
+        });
+      },
+      //获取详情
+      async getInfo(id) {
+        this.form = await invoiceApplyInfoAPI(id);
+      },
+      //获取分类管理中的数据
+      async getClassifyList(id, listName) {
+        let res = await getTreeByPid(id);
+        this[listName] = res.data;
+      },
+      //获取会计科目选中数据
+      changeSubjectInfo(val) {
+        if (!val) return (this.form.accountingSubjectName = '');
+        let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {};
+        this.form.accountingSubjectName = data.name;
+      },
+      // 获取部门数据
+      getDeptList() {
+        listOrganizations().then((list) => {
+          this.deptList = list;
+          this.deptTreeList = this.$util.toTreeData({
+            data: list,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
+        });
+      },
+      // 选择负责人部门
+      changeDeptInfo(id) {
+        const info = this.deptList.find((e) => e.id == id) || {};
+        this.form.applyDeptName = info.name;
+        this.form.applyUserId = '';
+        this.form.applyUserName = '';
+        this.getUserList(id);
+      },
+      // 获取人员数据
+      getUserList(deptId) {
+        if (deptId) {
+          this.$refs.directorRef.getList({ deptId });
+        }
+      },
+      //选择人员数据
+      changeUserInfo(val, info) {
+        this.form.applyUserName = info.name;
+      },
+      //
+      handleSelType(val) {
+        this.$refs.table.clearTable();
+      },
+      setPrice(val) {
+        this.form.amount = val;
+      },
+      //
+      getTableValue() {
+        return new Promise((resolve, reject) => {
+          this.$refs.form.validate(async (valid) => {
+            if (!valid) return this.$message.warning('有必填项未填,请检查');
+            let tableData = await this.$refs.table.getTableValidate();
+            this.form.link = tableData.link;
+            this.form.detailList = tableData.detailList;
+            const API = invoiceApplyUpdateAPI;
+            const res = await API(this.form);
+            res.code == '0' ? resolve('1') : reject(new Error(data.message));
+          });
+        });
       }
-    },
-    //选择人员数据
-    changeUserInfo(val, info) {
-      this.form.applyUserName = info.name;
-    },
-    //
-    handleSelType(val) {
-      this.$refs.table.clearTable()
-    },
-    setPrice(val) {
-      this.form.amount = val
-    },
-    //
-    getTableValue() {
-      return new Promise((resolve, reject) => {
-        this.$refs.form.validate(async valid => {
-          if (!valid) return this.$message.warning('有必填项未填,请检查')
-          let tableData = await this.$refs.table.getTableValidate()
-          this.form.link = tableData.link
-          this.form.detailList = tableData.detailList
-          const API = invoiceApplyUpdateAPI
-          const res = await API(this.form)
-          res.code == '0' ? resolve('1') : reject(new Error(data.message))
-        })
-      })
-
-    },
-  }
-}
+    }
+  };
 </script>
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 45 - 33
src/views/bpm/handleTask/components/financialManage/invoiceManage/components/detailDialog.vue

@@ -3,33 +3,59 @@
     <el-form ref="form" :model="form" label-width="130px">
       <headerTitle title="基本信息"></headerTitle>
       <el-row :gutter="12">
-        <el-row :gutter="12">
           <el-col :span="12">
             <el-form-item
               label="发票类型"
               prop="type"
-              style="margin-bottom: 22px">
+              >
               <el-select v-model="form.type" disabled style="width: 100%">
                 <el-option label="开票" :value="1"></el-option>
                 <el-option label="收票" :value="2"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="来源类型" prop="sourceType">
+              <el-select
+                v-model="form.sourceType"
+                :disabled="true"
+                style="width: 100%"
+              >
+                <el-option label="对账单" :value="1"></el-option>
+                <el-option label="合同" :value="2"></el-option>
+                <el-option label="订单" :value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 1">
+            <el-form-item label="对账单" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 2">
+            <el-form-item label="合同" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.sourceType == 3">
+            <el-form-item label="订单" prop="sourceCode">
+              <el-input v-model="form.sourceCode" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item
               label="金额"
               prop="amount"
-              style="margin-bottom: 22px">
+              >
               <el-input-number disabled v-model="form.amount" :precision="2" :controls="false" style="width: 100%"
                                :min="0"></el-input-number>
             </el-form-item>
           </el-col>
-        </el-row>
         <el-col :span="12">
           <el-form-item
             label="申请部门"
             prop="applyDeptId"
-            style="margin-bottom: 22px">
+            >
             <el-input v-model="form.applyDeptName" disabled></el-input>
           </el-form-item>
         </el-col>
@@ -37,18 +63,16 @@
           <el-form-item
             label="申请人"
             prop="applyUserId"
-            style="margin-bottom: 22px"
+            
           >
             <el-input v-model="form.applyUserName" disabled></el-input>
           </el-form-item>
         </el-col>
-      </el-row>
 
-      <el-row :gutter="12">
         <el-col :span="12">
           <el-form-item
             label="预计开票日期"
-            style="margin-bottom: 22px">
+            >
             <el-date-picker
               style="width: 100%"
               v-model="form.expectInvoiceDate"
@@ -62,27 +86,15 @@
           <el-form-item
             label="会计科目"
             prop="accountingSubjectId"
-            style="margin-bottom: 22px">
+            >
             <el-input v-model="form.accountingSubjectName" disabled></el-input>
           </el-form-item>
         </el-col>
-      </el-row>
-      <el-row :gutter="12">
+  
         <el-col :span="12" v-if="taskDefinitionKey=='financeApprove'">
           <el-form-item prop="files" label="发票附件">
             <fileMain v-model="form.files"  type="view"></fileMain>
-<!--            <div v-if="form.files && form.files?.length">-->
-<!--              <el-link-->
-<!--                v-for="link in form.files"-->
-<!--                :key="link.id"-->
-<!--                type="primary"-->
-<!--                :underline="false"-->
-<!--                @click="downloadFile(link)"-->
-<!--              >-->
-<!--                {{ link.name }}-->
-<!--              </el-link-->
-<!--              >-->
-<!--            </div>-->
+
           </el-form-item>
         </el-col>
       </el-row>
@@ -92,7 +104,7 @@
           <el-form-item
             label="公司名称"
             prop="companyName"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyName"></el-input>
           </el-form-item>
         </el-col>
@@ -100,7 +112,7 @@
           <el-form-item
             label="统一社会信用代码"
             prop="companyUsc"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyUsc"></el-input>
           </el-form-item>
         </el-col>
@@ -111,7 +123,7 @@
           <el-form-item
             label="开户银行"
             prop="companyBankBranchNo"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyBankBranchNo"></el-input>
           </el-form-item>
         </el-col>
@@ -119,7 +131,7 @@
           <el-form-item
             label="银行账户"
             prop="companyBankAccount"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyBankAccount"></el-input>
           </el-form-item>
         </el-col>
@@ -130,7 +142,7 @@
           <el-form-item
             label="电话号码"
             prop="companyTel"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyTel"></el-input>
           </el-form-item>
         </el-col>
@@ -138,7 +150,7 @@
           <el-form-item
             label="单位地址"
             prop="companyAddress"
-            style="margin-bottom: 22px">
+            >
             <el-input disabled v-model="form.companyAddress"></el-input>
           </el-form-item>
         </el-col>
@@ -151,7 +163,7 @@
           <el-form-item
             label="收票人"
             prop="receiverName"
-            style="margin-bottom: 22px"
+            
           >
             <el-input disabled v-model="form.receiverName"></el-input>
           </el-form-item>
@@ -160,7 +172,7 @@
           <el-form-item
             label="收票人地址"
             prop="receiverAddress"
-            style="margin-bottom: 22px"
+            
           >
             <el-input disabled v-model="form.receiverAddress"></el-input>
           </el-form-item>
@@ -171,7 +183,7 @@
           <el-form-item
             label="联系方式"
             prop="receiverTel"
-            style="margin-bottom: 22px"
+            
           >
             <el-input disabled v-model="form.receiverTel"></el-input>
           </el-form-item>

+ 247 - 252
src/views/bpm/handleTask/components/financialManage/invoiceManage/components/tableInfo.vue

@@ -6,272 +6,267 @@
       :columns="columns"
       :toolkit="[]"
       :datasource="tableForm.detailList"
-      row-key="id">
-      <!-- 表头工具栏 -->
-      <template v-slot:toolbar>
-        <el-button
-          v-if="form.type&&dialogType!='view'"
-          size="small"
-          type="primary"
-          icon="el-icon-plus"
-          class="ele-btn-icon"
-          @click="handleSelectAccount"
-        >
-          选择关联类型
-        </el-button>
-      </template>
+      row-key="id"
+    >
     </ele-pro-table>
-    <!--对账单-->
-    <account-statement-dialog ref="accountStatementDialogRef"
-                              :form="form"
-                              v-if="accountStatementDialogFlag"
-                              :accountstatement-dialog-flag.sync="accountStatementDialogFlag"
-                              @getAccountData="getAccountData">
-    </account-statement-dialog>
   </div>
 </template>
 <script>
-import accountStatementDialog from "./accountstatementDialog.vue";
-
-
-export default {
-  name: "tableInfo",
-  components: {
-    accountStatementDialog
-  },
-  props: {
-    form: {
-      type: Object,
-      default: () => {
-        return {
-          detailList: []
+  export default {
+    name: 'tableInfo',
+    components: {},
+    props: {
+      form: {
+        type: Object,
+        default: () => {
+          return {
+            detailList: []
+          };
+        }
+      },
+      dialogType: {
+        type: String,
+        default: ''
+      },
+      isOtherSourceFlag: {
+        type: Boolean,
+        default: false
+      },
+      contactData: {
+        type: Object,
+        default: () => {
+          return {};
         }
       }
     },
-    dialogType: {
-      type: String,
-      default: ""
-    },
-  },
-  data() {
-    return {
-      accountStatementDialogFlag: false,
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
+    data() {
+      return {
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
 
-        {
-          width: 100,
-          prop: 'typeName',
-          label: '类型',
-          slot: 'typeName',
-          align: "center"
-        },
-        {
-          minWidth: 100,
-          prop: 'sourceCode',
-          label: '类型编码',
-          slot: 'sourceCode',
-          align: "center"
-        },
-        // {
-        //   width: 100,
-        //   prop: 'productCategoryName',
-        //   label: '分类',
-        //   slot: 'productCategoryName',
-        //   align: "center"
-        // },
-        // {
-        //   width: 100,
-        //   prop: 'productCode',
-        //   label: '编码',
-        //   slot: 'productCode',
-        //   align: "center"
-        // },
-        {
-          minWidth: 100,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName',
-          align: "center"
-        },
-        {
-          minWidth: 100,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType',
-          align: "center"
-        },
-
-        {
-          minWidth: 100,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification',
-          align: "center"
-        },
-        // {
-        //   width: 100,
-        //   prop: 'productBrand',
-        //   label: '牌号',
-        //   slot: 'productBrand',
-        //   align: "center"
-        // },
-        {
-          width: 100,
-          prop: 'measuringUnit',
-          label: '单位',
-          slot: 'measuringUnit',
-          align: "center"
-        },
-        {
-          width: 80,
-          prop: 'totalCount',
-          label: '数量',
-          slot: 'totalCount',
-          align: "center"
-        },
+          {
+            width: 100,
+            prop: 'typeName',
+            label: '类型',
+            slot: 'typeName',
+            align: 'center'
+          },
+          // {
+          //   minWidth: 100,
+          //   prop: 'sourceCode',
+          //   label: '类型编码',
+          //   slot: 'sourceCode',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 100,
+          //   prop: 'productCategoryName',
+          //   label: '分类',
+          //   slot: 'productCategoryName',
+          //   align: "center"
+          // },
+          // {
+          //   width: 100,
+          //   prop: 'productCode',
+          //   label: '编码',
+          //   slot: 'productCode',
+          //   align: "center"
+          // },
+          {
+            minWidth: 100,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
 
-        {
-          minWidth: 80,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice',
-          align: "center"
-        },
-        {
-          minWidth: 80,
-          prop: 'totalPrice',
-          label: '金额',
-          slot: 'totalPrice',
-          align: "center"
-        },
-
-        // {
-        //   width: 130,
-        //   prop: 'modelType',
-        //   label: '品牌',
-        //   slot: 'modelType'
-        // },
+          {
+            minWidth: 100,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          // {
+          //   width: 100,
+          //   prop: 'productBrand',
+          //   label: '牌号',
+          //   slot: 'productBrand',
+          //   align: "center"
+          // },
+     
+          {
+            width: 80,
+            prop: 'totalCount',
+            label: '数量',
+            slot: 'totalCount',
+            align: 'center'
+          },
+      
+          {
+            width: 100,
+            prop: 'measuringUnit',
+            label: '单位',
+            slot: 'measuringUnit',
+            align: 'center'
+          },
+          {
+            width: 150,
+            prop: 'pricingWay',
+            label: '计价方式',
+            formatter: (row, column) => {
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
+            },
+            align: 'center'
 
-        // {
-        //   width: 100,
-        //   prop: 'sourceType',
-        //   label: '来源类型',
-        //   slot: 'sourceType',
-        //   align: "center",
-        //   formatter: (row, column) => {
-        //     return row.sourceType == 2 ? '对账销售订单' : '对账采购订单';
-        //   }
-        // },
+          },
+          {
+            minWidth: 80,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
+            width: 80,
+            prop: 'singleWeight',
+            label: '单量',
+            align: 'center'
+          },
+          
+          {
+            minWidth: 80,
+            prop: 'totalPrice',
+            label: '金额',
+            slot: 'totalPrice',
+            align: 'center'
+          }
 
-      ],
-      tableForm: {
-        detailList: [],
-        link: []
-      },
-      typeList: [
-        {
-          label: '销售发货',
-          value: '10',
-        },
-        {
-          label: '销售退货',
-          value: '11',
+          // {
+          //   width: 100,
+          //   prop: 'sourceType',
+          //   label: '来源类型',
+          //   slot: 'sourceType',
+          //   align: "center",
+          //   formatter: (row, column) => {
+          //     return row.sourceType == 2 ? '对账销售订单' : '对账采购订单';
+          //   }
+          // },
+        ],
+        tableForm: {
+          detailList: [],
+          link: []
         },
-        {
-          label: '采购收货',
-          value: '20',
-        }, {
-          label: '采购退货',
-          value: '21',
-        },
-
-      ],
-
-    }
-  },
-  mounted() {
-    this.tableForm = this.form
-  },
-  methods: {
-    //对账单
-    async handleSelectAccount() {
-      this.accountStatementDialogFlag = true
-    },
-    //获取选择的对账单数据
-    async getAccountData(params) {
-      if (params.children.orderType == 6) {
-
-        this.tableForm.detailList = params.children.detailList
-        this.tableForm.detailList.forEach((item, index) => {
-          item.sourceCode = params.children.orderNo
-          item.sourceId = params.children.id
-          item.sourceType = params.type == 1 ? 2 : 3
-          item.type = 12
-          item.singlePrice = item.discountSinglePrice
-          item.totalPrice = item.discountTotalPrice
-          item.typeName = '销售赔付'
-        })
-      } else {
-        this.tableForm.detailList = []
-        params.children.subList.forEach((item, index) => {
-          item.detailList.forEach((i, n) => {
-            i.sourceCode = item.statementSubOrderCode
-            i.sourceId = params.children.id
-            i.sourceType = params.type == 1 ? 2 : 3
-            i.type = item.subType
-            console.log(item.subType);
-            i.typeName = this.typeList.find(i => i.value == item.subType).label
-            item.singlePrice = item.discountSinglePrice
-            item.totalPrice = item.discountTotalPrice
-          })
-          this.tableForm.detailList.push(...item.detailList)
-        })
-        this.$refs.table.reload()
-      }
-      this.$emit('setPrice', params.children.amountTotalPrice)
-      let row = {
-        id: params.id,
-        name: params.statementNo,
-        code: params.statementNo,
-        linkType: params.type == 1 ? 190 : 290,
-        linkTypeName: params.type == 1 ? '销售对账单' : '采购对账单',
-      }
-      this.setSelectData(row)
-    },
-    clearTable() {
-      this.tableForm = {
-        detailList: [],
-        link: []
-      }
+        typeList: [
+          {
+            label: '销售发货',
+            value: '10'
+          },
+          {
+            label: '销售退货',
+            value: '11'
+          },
+          {
+            label: '采购收货',
+            value: '20'
+          },
+          {
+            label: '采购退货',
+            value: '21'
+          }
+        ]
+      };
     },
-    getTableValidate() {
-      return new Promise((resolve, reject) => {
-        if (this.tableForm.detailList.length == 0) return this.$message.warning('请选择关联信息')
-        resolve(this.tableForm)
-      })
+    mounted() {
+      this.tableForm = this.form;
     },
-    setSelectData(val) {
-      this.$set(this.tableForm.link[0], 'linkId', val.id)
-      this.$set(this.tableForm.link[0], 'linkName', val.name)
-      this.$set(this.tableForm.link[0], 'linkCode', val.code)
-      this.$set(this.tableForm.link[0], 'linkType', val.linkType)
-      this.$set(this.tableForm.link[0], 'linkTypeName', val.linkTypeName)
-    },
-    getTableData() {
-
+    methods: {
+      //获取选择的对账单数据
+      async getAccountData(params) {
+        if (params.children.orderType == 6) {
+          this.tableForm.detailList = params.children.detailList;
+          this.tableForm.detailList.forEach((item, index) => {
+            item.sourceCode = params.children.orderNo;
+            item.sourceId = params.children.id;
+            item.sourceType = params.type == 1 ? 2 : 3;
+            item.type = 12;
+            item.singlePrice = item.discountSinglePrice;
+            item.totalPrice = item.discountTotalPrice;
+            item.typeName = '销售赔付';
+          });
+        } else {
+          this.tableForm.detailList = [];
+          params.children.subList.forEach((item, index) => {
+            item.detailList.forEach((i, n) => {
+              i.sourceCode = item.statementSubOrderCode;
+              i.sourceId = params.children.id;
+              i.sourceType = params.type == 1 ? 2 : 3;
+              i.type = item.subType;
+              console.log(item.subType);
+              i.typeName = this.typeList.find(
+                (i) => i.value == item.subType
+              ).label;
+              // i.singlePrice = item.discountSinglePrice
+              i.totalPrice = i.discountTotalPrice;
+            });
+            this.tableForm.detailList.push(...item.detailList);
+          });
+          this.$refs.table.reload();
+        }
+        this.$emit('setPrice', params.children.amountTotalPrice);
+        let row = {
+          id: params.id,
+          name: params.statementNo,
+          code: params.statementNo,
+          linkType: params.type == 1 ? 190 : 290,
+          linkTypeName: params.type == 1 ? '销售对账单' : '采购对账单'
+        };
+        this.setSelectData(row);
+      },
+      setValue(data) {
+        this.tableForm.detailList = data;
+      },
+      clearTable() {
+        this.tableForm = {
+          detailList: [],
+          link: []
+        };
+      },
+      getTableValidate() {
+        return new Promise((resolve, reject) => {
+          if (this.tableForm.detailList.length == 0)
+            return this.$message.warning('请选择关联信息');
+          resolve(this.tableForm);
+        });
+      },
+      setSelectData(val) {
+        this.tableForm.link = [{}];
+        this.$set(this.tableForm.link[0], 'linkId', val.id);
+        this.$set(this.tableForm.link[0], 'linkName', val.name);
+        this.$set(this.tableForm.link[0], 'linkCode', val.code);
+        this.$set(this.tableForm.link[0], 'linkType', val.linkType);
+        this.$set(this.tableForm.link[0], 'linkTypeName', val.linkTypeName);
+      },
+      getTableData() {}
     }
-  }
-}
+  };
 </script>
 
-
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 6 - 4
src/views/bpm/handleTask/components/purchaseOrder/accountstatement/purchaseForm.vue

@@ -120,12 +120,13 @@
           v-if="taskDefinitionKey=='uploadReceipt'"
           prop="repliedFiles"
           label="回执附件">
-          <fileUpload
+          <!-- <fileUpload
             v-model="dataForm.repliedFiles"
             module="main"
             :showLib="false"
             :limit="10"
-          />
+          /> -->
+          <fileMain v-model="dataForm.repliedFiles"></fileMain>
         </el-form-item>
       </el-col>
     </el-row>
@@ -142,11 +143,12 @@
 <script xmlns:el-col="http://www.w3.org/1999/html">
 import parentList from "./supplierList.vue";
 import OrderListDialog from "./orderListDialog.vue";
-import fileUpload from "@/components/upload/fileUpload.vue";
+// import fileUpload from "@/components/upload/fileUpload.vue";
+import fileMain from "@/components/addDoc/index.vue";
 
 export default {
   name: "saleForm",
-  components: {fileUpload, OrderListDialog, parentList},
+  components: {fileMain, OrderListDialog, parentList},
   props: ['dataForm', 'datasource', 'dialogType', 'taskDefinitionKey'],
   data() {
     return {