|
@@ -1,13 +1,7 @@
|
|
|
<template>
|
|
|
<div style="width: 100%; padding: 0px 15px">
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
|
|
|
- <template #btn>
|
|
|
- <div>
|
|
|
- <el-button type="primary" v-if="
|
|
|
- [30].includes(route.query.processType) || !route.query.processType
|
|
|
- " @click="clickCopy(1)">复制合同</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+
|
|
|
<template #seller>
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item prop="sellCorporationId" label="卖方信息" class="wid100">
|
|
@@ -73,22 +67,23 @@
|
|
|
<el-form-item label="地址" class="wid100" required>
|
|
|
<el-row style="width: 100%">
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="" prop="countryId" class="margin-b-0">
|
|
|
- <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
|
|
|
+ <el-form-item label="" prop="countryId" class="margin-b-0 wid100">
|
|
|
+ <el-select v-model="formData.data.countryId" placeholder="国家" style="width:100%" filterable
|
|
|
+ @change="(val) => getCityData(val, '20', true)">
|
|
|
<el-option v-for="item in countryData" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="" prop="provinceName" class="margin-b-0">
|
|
|
+ <el-form-item label="" prop="provinceName" class="margin-b-0 wid100">
|
|
|
<selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
|
|
|
v-model="formData.data" :data="provinceData">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="" prop="cityName" class="margin-b-0">
|
|
|
+ <el-form-item label="" prop="cityName" class="margin-b-0 wid100">
|
|
|
<selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
@@ -127,7 +122,55 @@
|
|
|
<template #commodity>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">标准产品库</el-button>
|
|
|
- <el-table :data="formData.data.quotationProductList" style="width: 100%; ">
|
|
|
+ <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all row-key="productId">
|
|
|
+ <el-table-column type="expand" width="50" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-table :data="scope.row.listOne" style="width: 100%;" :show-header="false">
|
|
|
+ <el-table-column label="" width="50" />
|
|
|
+ <el-table-column label="商品图片" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productCnName" label="商品名称" min-width="130" />
|
|
|
+ <el-table-column prop="productCode" label="商品编码" width="130" />
|
|
|
+ <el-table-column label="尺寸 cm*cm*cm" width="180">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="数量" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item :prop="'quotationProductList.' + scope.$index + '.listOne.' + $index + '.quantity'" :rules="rules.quantity"
|
|
|
+ :inline-message="true" class="margin-b-0 wid100">
|
|
|
+ <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 label="单价" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.price}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="amount" label="小计" width="120" />
|
|
|
+ <el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
|
|
|
+ <template #default="{ $index }">
|
|
|
+ <el-button type="primary" link @click="handleDeleteMaterial(scope.$index,$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="商品图片" width="80">
|
|
|
<template #default="{ row }">
|
|
|
<div v-if="row.fileUrl">
|
|
@@ -145,32 +188,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="设计图稿" width="80">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <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($index)">
|
|
|
- <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="140">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <!-- <span class="el-click" v-if="!row.prodFilePath" @click="handleClickUpload('prodFilePath',false)">点击</span> -->
|
|
|
- <span class="el-click" v-if="row.prodFilePath" @click="handleClickUpload('prodFilePath',false,$index)">点击上传 (查看)</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="数量" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
|
|
|
class="margin-b-0 wid100">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
|
|
|
- :controls="false" :min="0" @change="calculationAmount('quantity')" />
|
|
|
+ :controls="false" :min="0" />
|
|
|
+ <!-- @change="calculationAmount('quantity')" -->
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -178,64 +203,20 @@
|
|
|
<el-table-column label="单价" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
|
|
|
+ {{row.price}}
|
|
|
+ <!-- <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
|
|
|
class="margin-b-0 wid100">
|
|
|
- <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)">
|
|
|
- <template #default>
|
|
|
- <div>
|
|
|
- <div>
|
|
|
- <img src="@/assets/images/money1.png" alt="" class="img" /> <span
|
|
|
- style="font-size:14px;font-weight:700;color:#000">销售指导价:</span>
|
|
|
- <div style="padding:5px 0px 0px 20px">
|
|
|
- {{row.currency}} {{moneyFormat(row.salePrice,2)}}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="margin-top:15px">
|
|
|
- <img src="@/assets/images/money2.png" alt="" class="img" /> <span
|
|
|
- style="font-size:14px;font-weight:700;color:#000">客户近期购买价格:</span>
|
|
|
- <div style="padding:5px 0px 0px 20px">
|
|
|
- <div v-for="item in row.customerContractProductList">
|
|
|
- <span>{{item.createTime.slice(0,10)}} </span>
|
|
|
- <span style="margin-left:40px">{{item.code}} </span>
|
|
|
- <span style="margin-left:40px"> {{item.currency}} {{moneyFormat(item.price,2)}} </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="margin-top:15px">
|
|
|
- <img src="@/assets/images/money3.png" alt="" class="img" /> <span
|
|
|
- style="font-size:14px;font-weight:700;color:#000">产品近期销售价格:</span>
|
|
|
- <div style="padding:5px 0px 0px 20px">
|
|
|
- <div v-for="item in row.quotationProductList">
|
|
|
- <span>{{item.createTime.slice(0,10)}} </span>
|
|
|
- <span style="margin-left:40px">{{item.code}} </span>
|
|
|
- <span style="margin-left:40px">{{item.currency}} {{moneyFormat(item.price,2)}} </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div :ref="row.productId+$index" style="height:180px">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #reference>
|
|
|
- <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
|
|
|
- <el-icon :size="20" color="#85c1a6">
|
|
|
- <WarningFilled />
|
|
|
- </el-icon>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-popover> -->
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
+
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" @change="calculationAmount()" />
|
|
|
+ </el-form-item> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="amount" label="小计" width="120" />
|
|
|
<el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
|
|
|
<template #default="{ $index }">
|
|
|
- <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)">重置</el-button>
|
|
|
+ <el-button type="primary" link @click="handleClickSelectMaterial($index)">配件</el-button>
|
|
|
<el-button type="primary" link @click="handleRemove($index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -278,7 +259,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
|
|
|
+ <el-table-column label="操作" width="80" align="center" fixed="right" v-if="!judgeStatus()">
|
|
|
<template #default="{ $index }">
|
|
|
<el-button type="primary" link @click="handleDelete($index)">删除</el-button>
|
|
|
</template>
|
|
@@ -288,12 +269,17 @@
|
|
|
</template>
|
|
|
</byForm>
|
|
|
|
|
|
- <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
|
|
|
- <!-- <SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.quotationProductList"></SelectCompanyProduct> -->
|
|
|
+ <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
|
|
|
<SelectProduct @selectProduct="selectProduct"></SelectProduct>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
|
|
|
+ <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
|
|
|
+ <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openSelectMaterial = false" size="defualt" v-debounce>关 闭</el-button>
|
|
|
+ </template>
|
|
|
+ </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>
|
|
|
<SelectSample @select="selectContract" v-if="copyType === 2"></SelectSample>
|
|
|
</el-dialog> -->
|
|
@@ -304,7 +290,7 @@
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import SelectCompanyProduct from "@/components/product/SelectCompanyProduct.vue";
|
|
|
import SelectProduct from "@/components/product/SelectProduct.vue";
|
|
|
-
|
|
|
+import SelectMaterial from "@/components/product/SelectMaterial.vue";
|
|
|
// import SelectCustomerProduct from "@/components/product/SelectCustomerProduct.vue";
|
|
|
import selectCity from "@/components/selectCity/index.vue";
|
|
|
import { useRoute } from "vue-router";
|
|
@@ -327,6 +313,7 @@ const fundsPaymentMethod = computed(
|
|
|
const shippingMethod = computed(
|
|
|
() => proxy.useUserStore().allDict["shipping_method"]
|
|
|
);
|
|
|
+const treeData = ref([]);
|
|
|
const accountList = ref([]);
|
|
|
const customerList = ref([]);
|
|
|
const corporationList = ref([]);
|
|
@@ -337,6 +324,8 @@ const cityData = ref([]);
|
|
|
const openProductCompany = ref(false);
|
|
|
const copyType = ref(1);
|
|
|
const copyContract = ref(false);
|
|
|
+const indexValue = ref(-1);
|
|
|
+const openSelectMaterial = ref(false);
|
|
|
const formData = reactive({
|
|
|
data: {
|
|
|
contractType: "2",
|
|
@@ -368,20 +357,14 @@ const formOption = reactive({
|
|
|
});
|
|
|
const formConfig = computed(() => {
|
|
|
return [
|
|
|
- // {
|
|
|
- // type: "slot",
|
|
|
- // slotName: "btn",
|
|
|
- // label: "",
|
|
|
- // itemWidth: 50,
|
|
|
- // },
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "合同类型",
|
|
|
+ title: "报价类型",
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
prop: "contractType",
|
|
|
- label: "合同类型",
|
|
|
+ label: "报价类型",
|
|
|
data: [
|
|
|
{
|
|
|
dictKey: "2",
|
|
@@ -392,6 +375,7 @@ const formConfig = computed(() => {
|
|
|
dictValue: "外销",
|
|
|
},
|
|
|
],
|
|
|
+ itemWidth: 50,
|
|
|
fn: (val) => {
|
|
|
if (val == "2") {
|
|
|
formData.data.currency = currencyData.value[0].dictKey;
|
|
@@ -406,180 +390,190 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- type: "title",
|
|
|
- title: "贸易信息",
|
|
|
- haveLine: true,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "slot",
|
|
|
- slotName: "seller",
|
|
|
- label: "",
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "slot",
|
|
|
- slotName: "buyer",
|
|
|
- label: "",
|
|
|
+ type: "treeSelect",
|
|
|
+ prop: "companyId",
|
|
|
+ label: "报价公司",
|
|
|
+ data: treeData.value,
|
|
|
+ propsTreeLabel: "deptName",
|
|
|
+ propsTreeValue: "deptId",
|
|
|
itemWidth: 50,
|
|
|
+ // disabled: companyId.value != "100",
|
|
|
},
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "付款信息",
|
|
|
+ title: "贸易信息",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
- {
|
|
|
- type: "select",
|
|
|
- prop: "currency",
|
|
|
- label: "币种",
|
|
|
- data: currencyData.value,
|
|
|
- itemWidth: 25,
|
|
|
- disabled: formData.data.contractType == "2",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "number",
|
|
|
- prop: "rate",
|
|
|
- label: "汇率",
|
|
|
- precision: 2,
|
|
|
- min: 0,
|
|
|
- controls: false,
|
|
|
- itemWidth: 25,
|
|
|
- disabled: formData.data.contractType == "2",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "select",
|
|
|
- prop: "paymentMethod",
|
|
|
- label: "付款方式",
|
|
|
- data: fundsPaymentMethod.value,
|
|
|
- itemWidth: 25,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "number",
|
|
|
- prop: "advanceRatio",
|
|
|
- label: "预付款比列(%)",
|
|
|
- precision: 2,
|
|
|
- min: 0,
|
|
|
- controls: false,
|
|
|
- itemWidth: 25,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "remark",
|
|
|
- label: "付款条件",
|
|
|
- itemType: "textarea",
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "select",
|
|
|
- prop: "shroffAccountId",
|
|
|
- label: "收款账号",
|
|
|
- data: accountList.value,
|
|
|
- itemWidth: 100,
|
|
|
- fn: (val) => {
|
|
|
- changeShroffAccount(val);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "beneficiaryName",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Beneficiary Name",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "beneficiaryAccountNumber",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Beneficiary Account Number",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "beneficiaryBank",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Beneficiary Bank",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "swiftCode",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Swift Code",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "beneficiaryBankAddress",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Beneficiary Bank Address",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "beneficiaryAddress",
|
|
|
- label: " ",
|
|
|
- placeholder: "请输入Beneficiary Address",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "1",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "accountName",
|
|
|
- label: "户名",
|
|
|
- placeholder: "请输入户名",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "2",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "openingBank",
|
|
|
- label: "开户行",
|
|
|
- placeholder: "请输入开户行",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "2",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "accountOpening",
|
|
|
- label: "账号",
|
|
|
- placeholder: "请输入账号",
|
|
|
- itemWidth: 50,
|
|
|
- isShow: formData.data.contractType == "2",
|
|
|
- },
|
|
|
// {
|
|
|
// type: "slot",
|
|
|
- // slotName: "payment",
|
|
|
+ // slotName: "seller",
|
|
|
// label: "",
|
|
|
+ // itemWidth: 50,
|
|
|
// },
|
|
|
{
|
|
|
- type: "title",
|
|
|
- title: "交付信息",
|
|
|
- haveLine: true,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "date",
|
|
|
- prop: "deliveryTime",
|
|
|
- label: "交货期限",
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "select",
|
|
|
- prop: "transportMethod",
|
|
|
- label: "运输方式",
|
|
|
- data: shippingMethod.value,
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "transportRemark",
|
|
|
- label: "运输说明",
|
|
|
- itemWidth: 50,
|
|
|
+ type: "slot",
|
|
|
+ slotName: "buyer",
|
|
|
+ label: "",
|
|
|
+ itemWidth: 100,
|
|
|
},
|
|
|
// {
|
|
|
+ // type: "title",
|
|
|
+ // title: "付款信息",
|
|
|
+ // haveLine: true,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "currency",
|
|
|
+ // label: "币种",
|
|
|
+ // data: currencyData.value,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // disabled: formData.data.contractType == "2",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "number",
|
|
|
+ // prop: "rate",
|
|
|
+ // label: "汇率",
|
|
|
+ // precision: 2,
|
|
|
+ // min: 0,
|
|
|
+ // controls: false,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // disabled: formData.data.contractType == "2",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "paymentMethod",
|
|
|
+ // label: "付款方式",
|
|
|
+ // data: fundsPaymentMethod.value,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "number",
|
|
|
+ // prop: "advanceRatio",
|
|
|
+ // label: "预付款比列(%)",
|
|
|
+ // precision: 2,
|
|
|
+ // min: 0,
|
|
|
+ // controls: false,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "remark",
|
|
|
+ // label: "付款条件",
|
|
|
+ // itemType: "textarea",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "shroffAccountId",
|
|
|
+ // label: "收款账号",
|
|
|
+ // data: accountList.value,
|
|
|
+ // itemWidth: 100,
|
|
|
+ // fn: (val) => {
|
|
|
+ // changeShroffAccount(val);
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "beneficiaryName",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Beneficiary Name",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "beneficiaryAccountNumber",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Beneficiary Account Number",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "beneficiaryBank",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Beneficiary Bank",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "swiftCode",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Swift Code",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "beneficiaryBankAddress",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Beneficiary Bank Address",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "beneficiaryAddress",
|
|
|
+ // label: " ",
|
|
|
+ // placeholder: "请输入Beneficiary Address",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "1",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "accountName",
|
|
|
+ // label: "户名",
|
|
|
+ // placeholder: "请输入户名",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "2",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "openingBank",
|
|
|
+ // label: "开户行",
|
|
|
+ // placeholder: "请输入开户行",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "2",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "accountOpening",
|
|
|
+ // label: "账号",
|
|
|
+ // placeholder: "请输入账号",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // isShow: formData.data.contractType == "2",
|
|
|
+ // },
|
|
|
+ // // {
|
|
|
+ // // type: "slot",
|
|
|
+ // // slotName: "payment",
|
|
|
+ // // label: "",
|
|
|
+ // // },
|
|
|
+ // {
|
|
|
+ // type: "title",
|
|
|
+ // title: "交付信息",
|
|
|
+ // haveLine: true,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "date",
|
|
|
+ // prop: "deliveryTime",
|
|
|
+ // label: "交货期限",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "transportMethod",
|
|
|
+ // label: "运输方式",
|
|
|
+ // data: shippingMethod.value,
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "transportRemark",
|
|
|
+ // label: "运输说明",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
// type: "slot",
|
|
|
// slotName: "delivery",
|
|
|
// label: "",
|
|
@@ -594,25 +588,25 @@ const formConfig = computed(() => {
|
|
|
slotName: "commodity",
|
|
|
label: "",
|
|
|
},
|
|
|
+ // {
|
|
|
+ // type: "title",
|
|
|
+ // title: "其他收费项目",
|
|
|
+ // haveLine: true,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "slot",
|
|
|
+ // slotName: "otherCharge",
|
|
|
+ // label: "",
|
|
|
+ // },
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "其他收费项目",
|
|
|
- haveLine: true,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "slot",
|
|
|
- slotName: "otherCharge",
|
|
|
- label: "",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "title",
|
|
|
- title: "合同总金额",
|
|
|
+ title: "报价总金额",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "amount",
|
|
|
- label: "合同总金额",
|
|
|
+ label: "报价总金额",
|
|
|
itemWidth: 25,
|
|
|
disabled: true,
|
|
|
},
|
|
@@ -620,7 +614,7 @@ const formConfig = computed(() => {
|
|
|
});
|
|
|
const rules = ref({
|
|
|
contractType: [
|
|
|
- { required: true, message: "请选择合同类型", trigger: "change" },
|
|
|
+ { required: true, message: "请选择报价类型", trigger: "change" },
|
|
|
],
|
|
|
sellCorporationId: [
|
|
|
{ required: true, message: "请选择卖方公司", trigger: "change" },
|
|
@@ -672,27 +666,39 @@ const getDict = () => {
|
|
|
}));
|
|
|
});
|
|
|
|
|
|
- proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
- corporationList.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
proxy
|
|
|
- .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
|
|
|
+ .get("/tenantDept/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ keyword: "",
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ type: 0,
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
- accountList.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.alias,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
+ treeData.value = proxy.handleTree(res.data, "deptId");
|
|
|
});
|
|
|
+
|
|
|
+ // proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
+ // corporationList.value = res.rows.map((item) => {
|
|
|
+ // return {
|
|
|
+ // ...item,
|
|
|
+ // label: item.name,
|
|
|
+ // value: item.id,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ // proxy
|
|
|
+ // .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
|
|
|
+ // .then((res) => {
|
|
|
+ // accountList.value = res.rows.map((item) => {
|
|
|
+ // return {
|
|
|
+ // ...item,
|
|
|
+ // label: item.alias,
|
|
|
+ // value: item.id,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // });
|
|
|
};
|
|
|
const getCityData = (id, type, isChange) => {
|
|
|
proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
|
|
@@ -831,6 +837,7 @@ const selectProduct = (goods) => {
|
|
|
price: null,
|
|
|
amount: "",
|
|
|
fileList: [],
|
|
|
+ listOne: [],
|
|
|
});
|
|
|
proxy.msgTip("添加成功", 1);
|
|
|
} else {
|
|
@@ -838,6 +845,40 @@ const selectProduct = (goods) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const handleClickSelectMaterial = (index) => {
|
|
|
+ indexValue.value = index;
|
|
|
+ openSelectMaterial.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const selectMaterial = (goods) => {
|
|
|
+ console.log(indexValue.value, formData.data.quotationProductList, "ss");
|
|
|
+ let flag = formData.data.quotationProductList[indexValue.value].listOne.some(
|
|
|
+ (x) => x.productId == goods.id
|
|
|
+ );
|
|
|
+ if (!flag) {
|
|
|
+ let fileUrl = "";
|
|
|
+ if (goods.fileList && goods.fileList.length > 0) {
|
|
|
+ fileUrl = goods.fileList[0].fileUrl;
|
|
|
+ }
|
|
|
+ formData.data.quotationProductList[indexValue.value].listOne.push({
|
|
|
+ fileUrl: fileUrl,
|
|
|
+ productId: goods.id,
|
|
|
+ productCnName: goods.name,
|
|
|
+ productCode: goods.customCode,
|
|
|
+ productLength: goods["length"],
|
|
|
+ productWidth: goods.width,
|
|
|
+ productHeight: goods.height,
|
|
|
+ quantity: null,
|
|
|
+ price: null,
|
|
|
+ amount: "",
|
|
|
+ fileList: [],
|
|
|
+ });
|
|
|
+ proxy.msgTip("选择成功");
|
|
|
+ } else {
|
|
|
+ proxy.msgTip("该物料已选择", 2);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const changeProductPrice = () => {
|
|
|
let productIds = formData.data.quotationProductList.map((x) => x.productId);
|
|
|
if (productIds && productIds.length > 0) {
|
|
@@ -960,6 +1001,10 @@ const handleDelete = (index) => {
|
|
|
totalAmount();
|
|
|
};
|
|
|
|
|
|
+const handleDeleteMaterial = (index, sonIndex) => {
|
|
|
+ formData.data.quotationProductList[index].listOne.splice(sonIndex, 1);
|
|
|
+};
|
|
|
+
|
|
|
const querySearch = (queryString, callback) => {
|
|
|
proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
|
|
|
if (res.rows && res.rows.length > 0) {
|