|
@@ -6,9 +6,6 @@
|
|
|
<el-button type="primary" v-if="
|
|
|
[30].includes(route.query.processType) || !route.query.processType
|
|
|
" @click="clickCopy(1)">复制合同</el-button>
|
|
|
- <el-button type="primary" v-if="
|
|
|
- [30].includes(route.query.processType) || !route.query.processType
|
|
|
- " @click="clickCopy(2)">复制样品单</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #seller>
|
|
@@ -21,17 +18,17 @@
|
|
|
<el-form-item label="地址" class="wid100">
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="" prop="sellCountryName" label-width="0px" class="margin-b-0">
|
|
|
+ <el-form-item label="" prop="sellCountryName" label-width="0px" class="margin-b-0 wid100">
|
|
|
<el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="" prop="sellProvinceName" label-width="0px" class="margin-b-0">
|
|
|
+ <el-form-item label="" prop="sellProvinceName" label-width="0px" class="margin-b-0 wid100">
|
|
|
<el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="" prop="sellCityName" label-width="0px" class="margin-b-0">
|
|
|
+ <el-form-item label="" prop="sellCityName" label-width="0px" class="margin-b-0 wid100">
|
|
|
<el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -110,9 +107,9 @@
|
|
|
<el-form-item label="联系人" class="wid100" required>
|
|
|
<el-row style="width: 100%">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0">
|
|
|
- <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" clearable class="inline-input w-50"
|
|
|
- placeholder="请输入联系人" @select="handlePerson">
|
|
|
+ <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" style="width:100%" clearable
|
|
|
+ class="inline-input w-50" placeholder="请输入联系人" @select="handlePerson">
|
|
|
</el-autocomplete>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -125,131 +122,10 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #payment>
|
|
|
- <div style="width: 100%">
|
|
|
- <el-row style="margin-top: 20px; width: 100%">
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="币种" prop="currency">
|
|
|
- <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
|
|
|
- <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="汇率" prop="rate">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="formData.data.rate" placeholder="请输入汇率" style="width: 100%" :precision="4"
|
|
|
- :controls="false" :min="0" :max="100" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top: 20px; width: 100%">
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="付款方式" prop="paymentMethod">
|
|
|
- <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
|
|
|
- <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="预付比例 (%)" prop="advanceRatio">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="formData.data.advanceRatio" placeholder="请输入预付比例" style="width: 100%"
|
|
|
- :precision="2" :controls="false" :min="0" :max="100" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top: 20px; width: 100%">
|
|
|
- <el-col :span="18">
|
|
|
- <el-form-item label="付款条件" prop="remark">
|
|
|
- <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top: 20px; width: 100%">
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label="收款账号" prop="shroffAccountId">
|
|
|
- <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%" @change="changeShroffAccount">
|
|
|
- <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label=" ">
|
|
|
- <el-button type="primary" @click="changeActiveName" text>
|
|
|
- <span v-if="activeName == '1'">收起</span>
|
|
|
- <span v-else>展开</span>
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div style="width: 100%; margin-top: 34px">
|
|
|
- <el-collapse v-model="activeName" class="hideCollapse" accordion>
|
|
|
- <el-collapse-item title="" name="1">
|
|
|
- <el-row style="width: 100%">
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label="Beneficiary Name" prop="beneficiaryName">
|
|
|
- <el-input v-model="formData.data.beneficiaryName" placeholder="请输入Beneficiary Name" />
|
|
|
- </el-form-item>
|
|
|
- <div style="height: 20px"></div>
|
|
|
- <el-form-item label="Beneficiary Bank" prop="beneficiaryBank">
|
|
|
- <el-input v-model="formData.data.beneficiaryBank" placeholder="请输入Beneficiary Bank" />
|
|
|
- </el-form-item>
|
|
|
- <div style="height: 20px"></div>
|
|
|
- <el-form-item label="Beneficiary Bank Address" prop="beneficiaryBankAddress">
|
|
|
- <el-input v-model="formData.data.beneficiaryBankAddress" placeholder="请输入Beneficiary Bank Address" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="9">
|
|
|
- <el-form-item label="Beneficiary Account Number" prop="beneficiaryAccountNumber">
|
|
|
- <el-input v-model="formData.data.beneficiaryAccountNumber" placeholder="请输入Beneficiary Account Number" />
|
|
|
- </el-form-item>
|
|
|
- <div style="height: 20px"></div>
|
|
|
- <el-form-item label="Swift Code" prop="swiftCode">
|
|
|
- <el-input v-model="formData.data.swiftCode" placeholder="请输入Swift Code" />
|
|
|
- </el-form-item>
|
|
|
- <div style="height: 20px"></div>
|
|
|
- <el-form-item label="Beneficiary Address" prop="beneficiaryAddress">
|
|
|
- <el-input v-model="formData.data.beneficiaryAddress" placeholder="请输入Beneficiary Address" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-collapse-item>
|
|
|
- </el-collapse>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #delivery>
|
|
|
- <div style="width: 100%">
|
|
|
- <el-row style="margin-top: 20px; width: 100%">
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="报价有效期 (天)" prop="effective">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="formData.data.effective" placeholder="请输入有效期" style="width: 100%"
|
|
|
- :precision="0" :controls="false" :min="0" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="交货期限" prop="deliveryTime">
|
|
|
- <el-date-picker v-model="formData.data.deliveryTime" type="date" placeholder="请选择交货期限" value-format="YYYY-MM-DD" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="运输方式" prop="transportMethod">
|
|
|
- <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
|
|
|
- <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="运输说明" prop="transportRemark">
|
|
|
- <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+
|
|
|
<template #commodity>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="openProductCompany = true" plain>标准产品库</el-button>
|
|
|
- <el-button type="primary" @click="clickCustomerProduct()" plain>客户产品库</el-button>
|
|
|
<el-table :data="formData.data.contractProductList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="商品图片" width="80">
|
|
|
<template #default="{ row }">
|
|
@@ -259,42 +135,39 @@
|
|
|
<div v-else></div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="productCnName" label="商品中文名" min-width="130" />
|
|
|
- <el-table-column label="商品英文名" min-width="180">
|
|
|
+ <el-table-column prop="productCnName" label="商品名称" min-width="130" />
|
|
|
+ <el-table-column prop="productCnName" label="商品编码" width="130" />
|
|
|
+
|
|
|
+ <el-table-column label="尺寸 cm*cm*cm" width="140">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
- <el-input v-model="row.productName" placeholder="请输入商品名称" />
|
|
|
- </el-form-item>
|
|
|
+ 30*80*960
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="尺寸 cm*cm*cm" width="140">
|
|
|
+ <el-table-column label="设计图稿" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
- <el-input v-model="row.productModel" placeholder="请输入" />
|
|
|
- </el-form-item>
|
|
|
+ <el-upload action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false"
|
|
|
+ :data="uploadData" :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="handleSuccess"
|
|
|
+ :on-preview="onPreviewFile">
|
|
|
+ <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
|
|
|
+ <el-icon v-else class="avatar-uploader-icon">
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
+ </el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="包装方式" width="180">
|
|
|
+ <el-table-column label="生产源文件" width="100">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.packMethod'" :rules="rules.packMethod" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
- <el-input v-model="row.packMethod" placeholder="请输入" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
+ <span class="el-click">点击上传</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
|
|
|
:controls="false" :min="0" @change="calculationAmount('quantity')" />
|
|
|
</el-form-item>
|
|
@@ -304,11 +177,11 @@
|
|
|
<el-table-column label="单价" width="140">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true" class="shrinkPadding">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
|
|
|
<div style="display:flex;">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
:controls="false" :min="0" @change="calculationAmount()" />
|
|
|
- <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
|
|
|
+ <!-- <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
|
|
|
<template #default>
|
|
|
<div>
|
|
|
<div>
|
|
@@ -351,27 +224,13 @@
|
|
|
</el-icon>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-popover>
|
|
|
+ </el-popover> -->
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="贸易方式" width="140">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProductList.' + $index + '.tradeMethods'" :rules="rules.tradeMethods" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
- <el-select v-model="row.tradeMethods" placeholder="请选择" style="width: 100%">
|
|
|
- <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column prop="amount" :label="'金额 ( ' + formData.data.currency + ' )'" width="130" />
|
|
|
+ <el-table-column prop="amount" label="小计" width="100" />
|
|
|
<el-table-column label="操作" width="60" align="center" fixed="right">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-button type="primary" link @click="handleRemove($index, row)">删除</el-button>
|
|
@@ -380,31 +239,16 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #file>
|
|
|
- <div style="width: 100%">
|
|
|
- <el-upload v-model:fileList="formData.data.fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData" multiple
|
|
|
- :before-upload="uploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
|
|
|
- <el-button type="primary" plain>选择</el-button>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #indication>
|
|
|
- <div style="width: 100%">
|
|
|
- <el-upload v-model:fileList="formData.data.packageFileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="indicationUploadData" multiple :before-upload="indicationUploadFile" :on-success="handleSuccess"
|
|
|
- :on-preview="onPreviewFile">
|
|
|
- <el-button type="primary" plain>选择</el-button>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+
|
|
|
<template #otherCharge>
|
|
|
<div style="width: 100%">
|
|
|
- <el-button type="primary" @click="clickAdd()">添加行</el-button>
|
|
|
+ <el-button type="primary" @click="clickAdd()" plain>添加行</el-button>
|
|
|
<el-table :data="formData.data.contractProjectList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="收费项目" width="220">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true"
|
|
|
+ class="margin-b-0 wid100">
|
|
|
<el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
|
|
|
placeholder="请输入收费项目" />
|
|
|
</el-form-item>
|
|
@@ -414,7 +258,7 @@
|
|
|
<el-table-column label="备注">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractProjectList.' + $index + '.remark'">
|
|
|
+ <el-form-item :prop="'contractProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
|
|
|
<el-input v-model="row.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -424,7 +268,7 @@
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
|
|
|
- class="shrinkPadding">
|
|
|
+ class="margin-b-0 wid100">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
|
|
|
:controls="false" :min="0" @change="totalAmount()" />
|
|
|
</el-form-item>
|
|
@@ -439,143 +283,16 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #offerMoney>
|
|
|
- <div style="width: 100%; display: flex">
|
|
|
- <div style="width: calc(100% - 190px)"></div>
|
|
|
- <div style="width: 130px; padding: 0 12px">
|
|
|
- <el-form-item label="合同总金额" prop="amount" class="shrinkPadding">
|
|
|
- <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #shipment>
|
|
|
- <!-- <div style="width: 100%">
|
|
|
- <el-table
|
|
|
- :data="formData.data.contractShipmentList"
|
|
|
- style="width: 100%; margin-top: 16px"
|
|
|
- >
|
|
|
- <el-table-column prop="productCode" label="商品编码" width="120" />
|
|
|
- <el-table-column prop="productName" label="商品名称" />
|
|
|
- <el-table-column label="出货日期" width="220">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'contractShipmentList.' + $index + '.shipmentTime'"
|
|
|
- :rules="rules.shipmentTime"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-date-picker
|
|
|
- v-model="row.shipmentTime"
|
|
|
- type="date"
|
|
|
- placeholder="请选择出货日期"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="数量" width="160">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'contractShipmentList.' + $index + '.quantity'"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.quantity"
|
|
|
- placeholder="请输入数量"
|
|
|
- style="width: 100%"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- @change="calculationAmount()"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="操作"
|
|
|
- width="120"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <el-button type="primary" link @click="clickSplit(row)"
|
|
|
- >拆分</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" link @click="clickDelete($index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div> -->
|
|
|
-
|
|
|
- <div style="width: 100%">
|
|
|
- <el-row>
|
|
|
- <el-col :span="10" style="border: 1px solid #ebeef5; padding: 10px">
|
|
|
- <el-form-item label="出货日期" required>
|
|
|
- <el-date-picker v-model="formData.data.shipmentTime" type="date" placeholder="请选择出货日期" value-format="YYYY-MM-DD" />
|
|
|
- </el-form-item>
|
|
|
- <el-table :data="formData.data.contractWaitShipmentList" @selection-change="handleSelectionChange" ref="tableDom"
|
|
|
- style="margin: 15px 0">
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
- <el-table-column prop="productCode" label="商品编号" width="90" />
|
|
|
- <el-table-column prop="productName" label="商品名称" min-width="250" />
|
|
|
- <el-table-column label="出货数量" width="160">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="
|
|
|
- 'contractWaitShipmentList.' + $index + '.quantity'
|
|
|
- " :inline-message="true">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0"
|
|
|
- :controls="false" :min="0" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="waitQuantity" label="剩余数量" />
|
|
|
- </el-table>
|
|
|
- <div style="text-align: center">
|
|
|
- <el-button type="primary" @click="handleAddShipment">添加</el-button>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="14">
|
|
|
- <div style="padding: 10px; margin-top: 77px">
|
|
|
- <el-table :data="formData.data.contractShipmentList" :span-method="objectSpanMethod">
|
|
|
- <el-table-column prop="shipmentTime" label="出货日期" width="100">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div>{{row.shipmentTime.slice(0,10)}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="productCode" label="商品编码" width="90" />
|
|
|
- <el-table-column prop="productName" label="商品名称" min-width="250" />
|
|
|
- <el-table-column prop="quantity" label="出货数量" width="90">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="操作" width="60" fixed="right">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</byForm>
|
|
|
|
|
|
<el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
|
|
|
<SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.contractProductList"></SelectCompanyProduct>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog v-if="openProductCustomer" v-model="openProductCustomer" title="客户产品库" width="90%" append-to-body>
|
|
|
+ <!-- <el-dialog v-if="openProductCustomer" v-model="openProductCustomer" title="客户产品库" width="90%" append-to-body>
|
|
|
<SelectCustomerProduct :buyCorporationId="formData.data.buyCorporationId" @selectProduct="selectProduct"
|
|
|
:alreadySelectData="formData.data.contractProductList"></SelectCustomerProduct>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
|
|
|
<el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
|
|
|
<SelectContract @select="selectContract" v-if="copyType === 1"></SelectContract>
|
|
@@ -668,19 +385,36 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "合同模板",
|
|
|
- label: "",
|
|
|
+ title: "合同类型",
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
- label: "选择合同模板",
|
|
|
- prop: "contractTemplateId",
|
|
|
- data: templateList.value,
|
|
|
+ prop: "type",
|
|
|
+ label: "合同类型",
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ dictKey: "0",
|
|
|
+ dictValue: "内销",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "1",
|
|
|
+ dictValue: "外销",
|
|
|
+ },
|
|
|
+ ],
|
|
|
fn: (val) => {
|
|
|
- changeTemplate(val);
|
|
|
+ // console.log(val, "ss");
|
|
|
+ if (val == "0") {
|
|
|
+ formData.data.aa = accountCurrency.value[0].dictKey;
|
|
|
+ formData.data.netWeight = 1;
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ type: "title",
|
|
|
+ title: "贸易信息",
|
|
|
+ haveLine: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
type: "slot",
|
|
|
slotName: "seller",
|
|
|
label: "",
|
|
@@ -692,29 +426,167 @@ const formConfig = computed(() => {
|
|
|
label: "",
|
|
|
itemWidth: 50,
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
type: "title",
|
|
|
title: "付款信息",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "payment",
|
|
|
- label: "",
|
|
|
+ type: "select",
|
|
|
+ prop: "aa",
|
|
|
+ label: "币种",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: formData.data.type == "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ prop: "netWeight",
|
|
|
+ label: "汇率",
|
|
|
+ precision: 2,
|
|
|
+ min: 0,
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: formData.data.type == "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "aa",
|
|
|
+ label: "付款方式",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ prop: "netWeight",
|
|
|
+ label: "预付款比列(%)",
|
|
|
+ precision: 2,
|
|
|
+ min: 0,
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 25,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "netWeightww",
|
|
|
+ label: "付款条件",
|
|
|
+ itemType: "textarea",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "shroffAccountId",
|
|
|
+ label: "收款账号",
|
|
|
+ data: accountList.value,
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "beneficiaryName",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Beneficiary Name",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "beneficiaryAccountNumber",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Beneficiary Account Number",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "beneficiaryBank",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Beneficiary Bank",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "swiftCode",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Swift Code",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "beneficiaryBankAddress",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Beneficiary Bank Address",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "beneficiaryAddress",
|
|
|
+ label: " ",
|
|
|
+ placeholder: "请输入Beneficiary Address",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "aasw",
|
|
|
+ label: "账户别名",
|
|
|
+ placeholder: "请输入账户别名",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "aasw",
|
|
|
+ label: "开户银行",
|
|
|
+ placeholder: "请输入开户银行",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "aasw",
|
|
|
+ label: "账户名",
|
|
|
+ placeholder: "请输入账户名",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow: formData.data.type == "0",
|
|
|
},
|
|
|
|
|
|
+ // {
|
|
|
+ // type: "slot",
|
|
|
+ // slotName: "payment",
|
|
|
+ // label: "",
|
|
|
+ // },
|
|
|
{
|
|
|
type: "title",
|
|
|
title: "交付信息",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "delivery",
|
|
|
- label: "",
|
|
|
+ type: "date",
|
|
|
+ prop: "wda",
|
|
|
+ label: "交货期限",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "aa",
|
|
|
+ label: "运输方式",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ itemWidth: 50,
|
|
|
},
|
|
|
{
|
|
|
+ type: "input",
|
|
|
+ prop: "wda",
|
|
|
+ label: "运输说明",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // type: "slot",
|
|
|
+ // slotName: "delivery",
|
|
|
+ // label: "",
|
|
|
+ // },
|
|
|
+ {
|
|
|
type: "title",
|
|
|
title: "商品信息",
|
|
|
haveLine: true,
|
|
@@ -725,17 +597,6 @@ const formConfig = computed(() => {
|
|
|
label: "",
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "file",
|
|
|
- label: "交接单",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "slot",
|
|
|
- slotName: "indication",
|
|
|
- label: "包装指示",
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
type: "title",
|
|
|
title: "其他收费项目",
|
|
|
haveLine: true,
|
|
@@ -746,19 +607,16 @@ const formConfig = computed(() => {
|
|
|
label: "",
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "offerMoney",
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
type: "title",
|
|
|
- title: "出货计划",
|
|
|
+ title: "合同总金额",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "shipment",
|
|
|
- label: "",
|
|
|
+ type: "input",
|
|
|
+ prop: "wda",
|
|
|
+ label: "合同总金额",
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: true,
|
|
|
},
|
|
|
];
|
|
|
});
|
|
@@ -1191,29 +1049,6 @@ const selectProduct = (goods) => {
|
|
|
if (goods.fileList && goods.fileList.length > 0) {
|
|
|
fileUrl = goods.fileList[0].fileUrl;
|
|
|
}
|
|
|
- let packMethod = "";
|
|
|
- if (goods.innerPackMethod) {
|
|
|
- let innerPackMethod = goods.innerPackMethod.split(",");
|
|
|
- innerPackMethod.map((item) => {
|
|
|
- if (packMethod) {
|
|
|
- packMethod =
|
|
|
- packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
|
|
|
- } else {
|
|
|
- packMethod = proxy.dictValueLabel(item, innerMethod.value);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (goods.outerPackMethod) {
|
|
|
- let outerPackMethod = goods.outerPackMethod.split(",");
|
|
|
- outerPackMethod.map((item) => {
|
|
|
- if (packMethod) {
|
|
|
- packMethod =
|
|
|
- packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
|
|
|
- } else {
|
|
|
- packMethod = proxy.dictValueLabel(item, outsideMethod.value);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
if (
|
|
|
formData.data.contractProductList &&
|
|
|
formData.data.contractProductList.length > 0
|
|
@@ -1230,8 +1065,9 @@ const selectProduct = (goods) => {
|
|
|
price: null,
|
|
|
amount: "",
|
|
|
tradeMethods: "",
|
|
|
- packMethod: packMethod,
|
|
|
+
|
|
|
selectType: goods.selectType,
|
|
|
+ fileList: [],
|
|
|
});
|
|
|
} else {
|
|
|
formData.data.contractProductList = [
|
|
@@ -1251,29 +1087,21 @@ const selectProduct = (goods) => {
|
|
|
price: null,
|
|
|
amount: "",
|
|
|
tradeMethods: "",
|
|
|
- packMethod: packMethod,
|
|
|
+
|
|
|
selectType: goods.selectType,
|
|
|
+ fileList: [],
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
- changeProductPrice();
|
|
|
+
|
|
|
+ // changeProductPrice();
|
|
|
//左侧待出货列表
|
|
|
- formData.data.contractWaitShipmentList.push({
|
|
|
- productCode: goods.code,
|
|
|
- rowId,
|
|
|
- productId: goods.id,
|
|
|
- productName: goods.nameEnglish,
|
|
|
- quantity: null,
|
|
|
- waitQuantity: "",
|
|
|
- });
|
|
|
- ElMessage({
|
|
|
- message: "添加成功!",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+
|
|
|
+ proxy.msgTip("添加成功", 1);
|
|
|
} else {
|
|
|
- return ElMessage("选择错误");
|
|
|
+ return proxy.msgTip("选择错误", 2);
|
|
|
}
|
|
|
- getDecisionAids();
|
|
|
+ // getDecisionAids();
|
|
|
};
|
|
|
|
|
|
const changeProductPrice = () => {
|
|
@@ -1571,12 +1399,7 @@ const indicationUploadFile = async (file) => {
|
|
|
file.uploadState = true;
|
|
|
return true;
|
|
|
};
|
|
|
-const handleSuccess = (any, UploadFile) => {
|
|
|
- UploadFile.raw.uploadState = false;
|
|
|
-};
|
|
|
-const onPreviewFile = (file) => {
|
|
|
- window.open(file.raw.fileUrl, "_blank");
|
|
|
-};
|
|
|
+
|
|
|
const clickSplit = (item) => {
|
|
|
formData.data.contractShipmentList.push({
|
|
|
productCode: item.code,
|
|
@@ -2165,111 +1988,32 @@ const selectContract = (businessId) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const selectShipmentData = ref([]);
|
|
|
-const tableDom = ref(null);
|
|
|
-const handleSelectionChange = (data) => {
|
|
|
- selectShipmentData.value = data;
|
|
|
-};
|
|
|
-const handleAddShipment = () => {
|
|
|
- if (formData.data.shipmentTime) {
|
|
|
- if (selectShipmentData.value && selectShipmentData.value.length > 0) {
|
|
|
- // 校验
|
|
|
- for (let i = 0; i < selectShipmentData.value.length; i++) {
|
|
|
- const e = selectShipmentData.value[i];
|
|
|
- if (!Number(e.quantity)) {
|
|
|
- return ElMessage("请输入出货数量");
|
|
|
- }
|
|
|
- if (Number(e.quantity) > Number(e.waitQuantity)) {
|
|
|
- return ElMessage(`${e.productName} 出货数量不能超过剩余数量`);
|
|
|
- }
|
|
|
- }
|
|
|
- // push
|
|
|
- for (let i = 0; i < selectShipmentData.value.length; i++) {
|
|
|
- const e = selectShipmentData.value[i];
|
|
|
- formData.data.contractShipmentList.push({
|
|
|
- rowId: e.rowId,
|
|
|
- productId: e.productId,
|
|
|
- productCode: e.productCode,
|
|
|
- productName: e.productName,
|
|
|
- quantity: e.quantity,
|
|
|
- shipmentTime: formData.data.shipmentTime,
|
|
|
- });
|
|
|
- e.quantity = 0;
|
|
|
- }
|
|
|
- // 清空选择的数据
|
|
|
- tableDom.value.clearSelection();
|
|
|
- formData.data.shipmentTime = "";
|
|
|
- changeWaitQuantity();
|
|
|
- } else {
|
|
|
- ElMessage("请勾选数据");
|
|
|
- }
|
|
|
- } else {
|
|
|
- ElMessage("请选择出货日期");
|
|
|
- }
|
|
|
-};
|
|
|
-const changeWaitQuantity = () => {
|
|
|
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
- if (formData.data.contractProductList[i].quantity) {
|
|
|
- formData.data.contractWaitShipmentList[i].waitQuantity =
|
|
|
- formData.data.contractProductList[i].quantity;
|
|
|
- }
|
|
|
- }
|
|
|
- if (
|
|
|
- formData.data.contractShipmentList &&
|
|
|
- formData.data.contractShipmentList.length > 0
|
|
|
- ) {
|
|
|
- for (let i = 0; i < formData.data.contractWaitShipmentList.length; i++) {
|
|
|
- const e = formData.data.contractWaitShipmentList[i];
|
|
|
- let arr = formData.data.contractShipmentList.filter(
|
|
|
- (x) => x.rowId === e.rowId
|
|
|
- );
|
|
|
- let quantity = 0;
|
|
|
- for (let j = 0; j < arr.length; j++) {
|
|
|
- quantity += arr[j].quantity;
|
|
|
- }
|
|
|
- e.waitQuantity = e.waitQuantity - quantity;
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-const flitterData = (arr) => {
|
|
|
- let spanOneArr = [];
|
|
|
- let concatOne = 0;
|
|
|
- arr.forEach((item, index) => {
|
|
|
- if (index === 0) {
|
|
|
- spanOneArr.push(1);
|
|
|
- } else {
|
|
|
- //注意这里的quarterly是表格绑定的字段,根据自己的需求来改
|
|
|
- if (item.shipmentTime === arr[index - 1].shipmentTime) {
|
|
|
- //第一列需合并相同内容的判断条件
|
|
|
- spanOneArr[concatOne] += 1;
|
|
|
- spanOneArr.push(0);
|
|
|
- } else {
|
|
|
- spanOneArr.push(1);
|
|
|
- concatOne = index;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return {
|
|
|
- one: spanOneArr,
|
|
|
- };
|
|
|
+const handleBeforeUpload = async (file, index) => {
|
|
|
+ const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
+ uploadData.value = res.uploadBody;
|
|
|
+ // file.id = res.id;
|
|
|
+ // file.fileName = res.fileName;
|
|
|
+ // file.fileUrl = res.fileUrl;
|
|
|
+ formData.data.contractProductList[index].fileList = [
|
|
|
+ {
|
|
|
+ id: res.id,
|
|
|
+ fileName: res.fileName,
|
|
|
+ fileUrl: res.fileUrl,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ formData.data.contractProductList[index].imageUrl = res.fileUrl;
|
|
|
+ return true;
|
|
|
};
|
|
|
|
|
|
-const objectSpanMethod = ({ rowIndex, columnIndex }) => {
|
|
|
- if (columnIndex === 0) {
|
|
|
- const _row = flitterData(formData.data.contractShipmentList).one[rowIndex];
|
|
|
- const _col = _row > 0 ? 1 : 0;
|
|
|
- return {
|
|
|
- rowspan: _row,
|
|
|
- colspan: _col,
|
|
|
- };
|
|
|
- }
|
|
|
+const handleSuccess = (any, UploadFile) => {
|
|
|
+ UploadFile.raw.uploadState = false;
|
|
|
+};
|
|
|
+const onPreviewFile = (file) => {
|
|
|
+ if (file && file.fileUrl) window.open(file.fileUrl, "_blank");
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-::v-deep(.el-input-number .el-input__inner) {
|
|
|
- text-align: left;
|
|
|
-}
|
|
|
.img {
|
|
|
object-fit: contain;
|
|
|
width: 16px;
|
|
@@ -2283,20 +2027,12 @@ const objectSpanMethod = ({ rowIndex, columnIndex }) => {
|
|
|
cursor: pointer;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
-.shrinkPadding {
|
|
|
- padding-right: 0 !important;
|
|
|
-}
|
|
|
-.hideCollapse {
|
|
|
- margin-top: -62px;
|
|
|
- border: 0 !important;
|
|
|
-}
|
|
|
-::v-deep(.el-collapse-item__arrow) {
|
|
|
- display: none !important;
|
|
|
-}
|
|
|
-::v-deep(.el-collapse-item__wrap) {
|
|
|
- border: 0 !important;
|
|
|
-}
|
|
|
-::v-deep(.el-collapse-item__header) {
|
|
|
- border: 0 !important;
|
|
|
+.el-icon.avatar-uploader-icon {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #8c939d;
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px dashed var(--el-border-color);
|
|
|
}
|
|
|
</style>
|