|
@@ -0,0 +1,782 @@
|
|
|
+<template>
|
|
|
+ <div style="width: 100%; padding: 0px 15px">
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
|
|
|
+ <template #commodity>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-table :data="formData.data.outboundRecordList" style="width: 100%; ">
|
|
|
+ <!-- v-if="['10'].includes(formData.data.selectType)" -->
|
|
|
+ <el-table-column prop="quantity" label="收付款说明" min-width="200">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input v-model="row.quantity" placeholder="请输入" type="textarea" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="申请事由" min-width="200">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input v-model="row.quantity" placeholder="请输入" type="textarea" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- v-if="['20'].includes(formData.data.selectType)" -->
|
|
|
+ <el-table-column prop="quantity" label="抵扣工资月份" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-date-picker v-model="row.aa" type="month" placeholder="请选择" style="width: 100%" value-format="YYYY-MM" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="结存预付款(含税)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="结存预付款(不含税)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本期预付款(含税)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本期预付款(不含税)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="账期" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-date-picker v-model="row.aa" type="month" placeholder="请选择" style="width: 100%" value-format="YYYY-MM" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本账期金额(含税)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本账期金额(不含税)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本账期调整金额" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="抵扣预付款(含税)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="抵扣预付款(不含税)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="开票税点" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" :max="100" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="税费" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="发票附件" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
|
|
|
+ :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
|
|
|
+ :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
|
|
|
+ <el-button text type="primary">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="非发票附件" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
|
|
|
+ :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
|
|
|
+ :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
|
|
|
+ <el-button text type="primary">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="归还转账截图" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
|
|
|
+ :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
|
|
|
+ :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
|
|
|
+ <el-button text type="primary">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="收款单位" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="其他" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="店铺名称" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in shopList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="供应商" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="费用类型" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="刷单时间/推广费类别" width="160">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="刷单时间" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-date-picker v-model="row.aa" type="date" placeholder="请选择" style="width: 100%" value-format="YYYY-MM-DD" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="推广费类别" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
|
|
|
+ <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本期应付(抵扣)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本期应付(抵扣前)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="本期应付(抵扣后)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="quantity" label="本期应付" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="归还金额" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="quantity" label="记账科目" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-tree-select v-model="formData.data.parentId" :data="sourceList.data" :disabled="modalType=='edit'" check-strictly
|
|
|
+ :render-after-expand="false" node-key="deptId" :props="defaultProps" style="width:100%" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="核算项目名称" width="110" prop="amount" />
|
|
|
+ <el-table-column label="核算项目" width="100" prop="amount" />
|
|
|
+ <el-table-column label="记账金额" width="100" prop="amount" />
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byForm>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import byForm from "@/components/byForm/index";
|
|
|
+const route = useRoute();
|
|
|
+// 接收父组件的传值
|
|
|
+const props = defineProps({
|
|
|
+ queryData: Object,
|
|
|
+});
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
+const frontLinesData = computed(
|
|
|
+ () => proxy.useUserStore().allDict["front_lines"]
|
|
|
+);
|
|
|
+const statusData = ref([]);
|
|
|
+const treeData = ref([]);
|
|
|
+const deptData = ref([]);
|
|
|
+const userList = ref([]);
|
|
|
+const accountList = ref([]);
|
|
|
+const shopList = ref([]);
|
|
|
+const supplierList = ref([]);
|
|
|
+const isAfterSubmit = ref([
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const isAfterSubmitOne = ref([
|
|
|
+ {
|
|
|
+ label: "店铺充值",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "转账",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const formData = reactive({
|
|
|
+ data: {},
|
|
|
+});
|
|
|
+const formDom = ref(null);
|
|
|
+const judgeStatus = () => {
|
|
|
+ if (route.query.processType == 20 || route.query.processType == 10) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (props.queryData.recordList && props.queryData.recordList.length > 0) {
|
|
|
+ let data = props.queryData.recordList.filter(
|
|
|
+ (item) => item.status === 2 && item.nodeType !== 1
|
|
|
+ );
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+};
|
|
|
+const formOption = reactive({
|
|
|
+ inline: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ itemWidth: 100,
|
|
|
+ disabled: false,
|
|
|
+});
|
|
|
+const formConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "基本信息",
|
|
|
+ haveLine: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "收付款类型",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: statusData.value,
|
|
|
+ // clearable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "documentaryRemark",
|
|
|
+ label: "记账凭证号",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ // isShow: !["100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "是否预付",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: isAfterSubmit.value,
|
|
|
+ // clearable: true,
|
|
|
+ // isShow: !["10", "20", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ prop: "documentaryTime",
|
|
|
+ label: "申请日期",
|
|
|
+ disabled: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "documentaryRemark",
|
|
|
+ label: "流水号",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "快递公司",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: statusData.value,
|
|
|
+ // clearable: true,
|
|
|
+ // isShow: ["10", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "documentaryRemark",
|
|
|
+ label: "开票税点",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "devUserId",
|
|
|
+ label: "申请人",
|
|
|
+ required: true,
|
|
|
+ filterable: true,
|
|
|
+ data: userList.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ // isShow: !["10", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "是否后提交凭证",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: isAfterSubmit.value,
|
|
|
+ // clearable: true,
|
|
|
+ // isShow: !["10", "20", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "treeSelect",
|
|
|
+ prop: "companyId",
|
|
|
+ label: "业务公司",
|
|
|
+ data: treeData.value,
|
|
|
+ propsTreeLabel: "deptName",
|
|
|
+ propsTreeValue: "deptId",
|
|
|
+ itemWidth: 25,
|
|
|
+ fn: (val) => {
|
|
|
+ getDeptData(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ type: "treeSelect",
|
|
|
+ prop: "deptId",
|
|
|
+ label: "业务部门",
|
|
|
+ data: deptData.value,
|
|
|
+ propsTreeLabel: "deptName",
|
|
|
+ propsTreeValue: "deptId",
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "收付款明细",
|
|
|
+ haveLine: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "commodity",
|
|
|
+ label: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "收付款信息",
|
|
|
+ haveLine: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "是否公出转出",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: isAfterSubmit.value,
|
|
|
+ // clearable: true,
|
|
|
+ // isShow: !["10", "20", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "付款方式",
|
|
|
+ prop: "status",
|
|
|
+ itemWidth: 25,
|
|
|
+ data: isAfterSubmitOne.value,
|
|
|
+ // clearable: true,
|
|
|
+ // isShow: !["10", "20", "100"].includes(formData.data.selectType),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "openingBank",
|
|
|
+ label: "充值店铺名称",
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "shroffAccountId",
|
|
|
+ label: "公司公户",
|
|
|
+ data: accountList.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ fn: (val) => {
|
|
|
+ changeShroffAccount(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "openingBank",
|
|
|
+ label: "开户行",
|
|
|
+ placeholder: "请输入开户行",
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "accountName",
|
|
|
+ label: "开户名",
|
|
|
+ placeholder: "请输入开户名",
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "accountOpening",
|
|
|
+ label: "账号",
|
|
|
+ placeholder: "请输入账号",
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const rules = ref({
|
|
|
+ quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
|
|
|
+});
|
|
|
+
|
|
|
+const changeShroffAccount = (val) => {
|
|
|
+ if (val) {
|
|
|
+ let data = accountList.value.find((item) => item.value == val);
|
|
|
+ if (data) {
|
|
|
+ formData.data.accountName = data.name;
|
|
|
+ formData.data.openingBank = data.openingBank;
|
|
|
+ formData.data.accountOpening = data.accountOpening;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const getDeptData = (val) => {
|
|
|
+ proxy
|
|
|
+ .get("/tenantUser/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10000,
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ companyId: val,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ userList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.nickName,
|
|
|
+ value: item.userId,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .get("/tenantDept/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ keyword: "",
|
|
|
+ ancestors: val,
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ // type: 2,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ deptData.value = proxy.handleTree(res.data, "deptId");
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const getDict = () => {
|
|
|
+ proxy
|
|
|
+ .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
|
|
|
+ .then((res) => {
|
|
|
+ accountList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.alias,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy.post("/shopInfo/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
|
|
|
+ shopList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.alias,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .post("/supplierInfo/page", { pageNum: 1, pageSize: 9999 })
|
|
|
+ .then((res) => {
|
|
|
+ supplierList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .get("/tenantDept/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ keyword: "",
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ type: 0,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ treeData.value = proxy.handleTree(res.data, "deptId");
|
|
|
+ });
|
|
|
+};
|
|
|
+getDict();
|
|
|
+
|
|
|
+const totalAmount = () => {
|
|
|
+ let money = 0;
|
|
|
+ if (
|
|
|
+ formData.data.outboundRecordList &&
|
|
|
+ formData.data.outboundRecordList.length > 0
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.outboundRecordList.length; i++) {
|
|
|
+ formData.data.outboundRecordList[i].amount = parseFloat(
|
|
|
+ Number(formData.data.outboundRecordList[i].quantity) *
|
|
|
+ Number(formData.data.outboundRecordList[i].price)
|
|
|
+ ).toFixed(2);
|
|
|
+ money = parseFloat(
|
|
|
+ Number(money) + Number(formData.data.outboundRecordList[i].amount)
|
|
|
+ ).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.amount = money;
|
|
|
+};
|
|
|
+
|
|
|
+const handleSubmit = async () => {
|
|
|
+ let flag = await formDom.value.handleSubmit(() => {});
|
|
|
+ if (flag) {
|
|
|
+ if (
|
|
|
+ formData.data.outboundRecordList &&
|
|
|
+ formData.data.outboundRecordList.length > 0
|
|
|
+ ) {
|
|
|
+ let total = 0;
|
|
|
+ for (let i = 0; i < formData.data.outboundRecordList.length; i++) {
|
|
|
+ const ele = formData.data.outboundRecordList[i];
|
|
|
+ total += Number(ele.quantity);
|
|
|
+ if (
|
|
|
+ Number(ele.quantity) + Number(ele.saleOutboundQuantity) >
|
|
|
+ Number(ele.orderQuantity)
|
|
|
+ ) {
|
|
|
+ proxy.msgTip("出库数量加已出库数量不能大于订单数量", 2);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!(total > 0)) {
|
|
|
+ proxy.msgTip("出库数量不能为0", 2);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ const errorDiv = document.getElementsByClassName("is-error");
|
|
|
+ errorDiv[0].scrollIntoView();
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ return flag;
|
|
|
+};
|
|
|
+
|
|
|
+const getFormData = () => {
|
|
|
+ return proxy.deepClone(formData.data);
|
|
|
+};
|
|
|
+// 向父组件暴露
|
|
|
+defineExpose({
|
|
|
+ getFormData,
|
|
|
+ handleSubmit,
|
|
|
+});
|
|
|
+
|
|
|
+const getAllData = (businessId) => {
|
|
|
+ let obj = {};
|
|
|
+ if (route.query && route.query.obj) {
|
|
|
+ obj = JSON.parse(route.query.obj);
|
|
|
+ }
|
|
|
+ proxy.post("/contract/detail", { id: businessId }).then((res) => {
|
|
|
+ formData.data = {
|
|
|
+ contractId: businessId,
|
|
|
+ outboundRecordList: res.contractProductList.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ contractProductId: x.id,
|
|
|
+ orderQuantity: x.quantity,
|
|
|
+ quantity: obj[x.id] || null,
|
|
|
+ amount: "",
|
|
|
+ })),
|
|
|
+ amount: "",
|
|
|
+ };
|
|
|
+ totalAmount();
|
|
|
+ if (
|
|
|
+ formData.data.outboundRecordList &&
|
|
|
+ formData.data.outboundRecordList.length > 0
|
|
|
+ ) {
|
|
|
+ let productIds = formData.data.outboundRecordList.map((x) => x.productId);
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: formData.data.outboundRecordList,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ formOption.disabled = judgeStatus();
|
|
|
+ if (route.query && route.query.businessId && !route.query.processType) {
|
|
|
+ let businessId = route.query.businessId;
|
|
|
+ getAllData(businessId);
|
|
|
+ } else if (route.query && route.query.businessId && route.query.processType) {
|
|
|
+ proxy
|
|
|
+ .post("/contractOutboundInfo/detail", { id: route.query.businessId })
|
|
|
+ .then((res) => {
|
|
|
+ formData.data = res;
|
|
|
+ totalAmount();
|
|
|
+ if (
|
|
|
+ formData.data.outboundRecordList &&
|
|
|
+ formData.data.outboundRecordList.length > 0
|
|
|
+ ) {
|
|
|
+ let productIds = formData.data.outboundRecordList.map(
|
|
|
+ (x) => x.productId
|
|
|
+ );
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: formData.data.outboundRecordList,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.table {
|
|
|
+ border-collapse: collapse;
|
|
|
+ border-spacing: 0;
|
|
|
+
|
|
|
+ td {
|
|
|
+ text-align: center;
|
|
|
+ padding: 2px 4px;
|
|
|
+ // padding: 5px 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.small-title {
|
|
|
+ padding-left: 15px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #3366ff;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+:deep(.el-checkbox) {
|
|
|
+ margin-right: 0px;
|
|
|
+}
|
|
|
+// :deep(.el-collapse-item) {
|
|
|
+// margin-bottom: 10px;
|
|
|
+// }
|
|
|
+:deep(.el-collapse-item__header) {
|
|
|
+ background-color: #eee;
|
|
|
+}
|
|
|
+</style>
|