|
@@ -5,7 +5,7 @@
|
|
|
<div>
|
|
|
<el-button type="primary" v-if="
|
|
|
[30].includes(route.query.processType) || !route.query.processType
|
|
|
- " @click="clickCopy(1)">复制合同</el-button>
|
|
|
+ " @click="clickCopy(1)">复制订单</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -24,8 +24,8 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
|
|
|
<el-tree-select v-model="formData.data.deptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
|
|
|
- :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }"
|
|
|
- :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
|
|
|
+ :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }" />
|
|
|
+ <!-- :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -152,6 +152,29 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
+ <template #advanceRatio>
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="6" style="padding-right:8px">
|
|
|
+ <el-form-item label="定⾦⽐例" prop="advanceRatio" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="formData.data.advanceRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
|
|
|
+ :controls="false" @change="(val)=>changeAdvanceRatio(val,true)" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="padding:0px 4px">
|
|
|
+ <el-form-item label="出货前付款比例" prop="beforeShipmentRatio" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="formData.data.beforeShipmentRatio" placeholder="请输入" style="width: 100%" :precision="2" :min="0" :max="100"
|
|
|
+ :controls="false" @change="(val)=>changeAdvanceRatio(val,false)" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="padding:0px 4px">
|
|
|
+ <el-form-item label="出货后付款比例" prop="afterShipmentRatio" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="formData.data.afterShipmentRatio" placeholder=" " style="width: 100%" :precision="2" :min="0" :max="100"
|
|
|
+ :controls="false" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #commodity>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus() && isEditList"
|
|
@@ -175,7 +198,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="productCode" label="物料编码" width="190" />
|
|
|
<el-table-column prop="productName" label="物料名称" min-width="200" />
|
|
|
- <el-table-column label="尺寸 (cm)" width="130">
|
|
|
+ <el-table-column label="规格尺寸 (cm)" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
{{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
@@ -237,31 +260,54 @@
|
|
|
<div v-else></div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="productCnName" label="商品名称" min-width="130" />
|
|
|
- <el-table-column prop="productCode" label="商品编码" width="150" />
|
|
|
- <el-table-column label="尺寸 (cm)" width="130">
|
|
|
+ <el-table-column prop="productName" label="商品其他信息" width="500">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ <div style="width: 100%;line-height:22px">
|
|
|
+ <el-row :gutter="5">
|
|
|
+ <el-col :span="12">
|
|
|
+ 分类:{{row.productClassifyName}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ 编码名称:{{row.productCode}}({{row.productName}})
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="7">
|
|
|
+ 名称:{{row.productName}}
|
|
|
+ </el-col> -->
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="5">
|
|
|
+ <el-col :span="12">
|
|
|
+ 规格尺寸 (cm): {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ 颜色:{{row.productColor}}
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="5">
|
|
|
+ <el-col :span="12">
|
|
|
+ 纹路:{{dictKeyValue(row.productFrontalTexture,frontLinesData)}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ 净重: {{row.productNetWeight}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ 单位:{{row.productUnit}}
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="productColor" label="颜色" width="140" />
|
|
|
- <!-- <el-table-column label="设计图稿" width="80">
|
|
|
+
|
|
|
+ <!-- <el-table-column label="规格尺寸 (cm)" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-upload :action="uploadUrl" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false" :data="uploadData"
|
|
|
- :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
|
|
|
- <div v-loading="row.imgLoading">
|
|
|
- <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon">
|
|
|
- <Plus />
|
|
|
- </el-icon>
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productColor" label="颜色" width="140" />
|
|
|
+ <el-table-column prop="ww" label="纹路" width="140" />
|
|
|
+ <el-table-column prop="weight" label="净重" width="140" />
|
|
|
+ <el-table-column prop="unit" label="单位" width="140" /> -->
|
|
|
<el-table-column label="生产plt文件" width="210">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width:100%">
|
|
@@ -293,7 +339,7 @@
|
|
|
<el-form-item :prop="'contractProductList.' + $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')" v-if="isEditList" />
|
|
|
+ :controls="false" :min="0" @change="calculationAmount()" v-if="isEditList" />
|
|
|
<div v-else> {{row.quantity}}</div>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -357,6 +403,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="出厂单价" prop="factoryPrice" width="100">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="amount" label="小计" width="110">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -364,6 +412,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="amountTwo" label="出厂小计金额" width="110">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ ¥ {{row.amountTwo}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="备注" min-width="200">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -448,7 +503,7 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
|
|
|
+ <!-- <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> -->
|
|
@@ -483,6 +538,21 @@ const fundsPaymentMethod = computed(
|
|
|
const shippingMethod = computed(
|
|
|
() => proxy.useUserStore().allDict["shipping_method"]
|
|
|
);
|
|
|
+const contractChannel = computed(
|
|
|
+ () => proxy.useUserStore().allDict["contract_channel"]
|
|
|
+);
|
|
|
+const taxTransportationWay = computed(
|
|
|
+ () => proxy.useUserStore().allDict["tax_transportation_way"]
|
|
|
+);
|
|
|
+const shopName = computed(() => proxy.useUserStore().allDict["shop_name"]);
|
|
|
+
|
|
|
+const taxPoints = computed(() => proxy.useUserStore().allDict["tax_points"]);
|
|
|
+const settlementWay = computed(
|
|
|
+ () => proxy.useUserStore().allDict["settlement_way"]
|
|
|
+);
|
|
|
+const frontLinesData = computed(
|
|
|
+ () => proxy.useUserStore().allDict["front_lines"]
|
|
|
+);
|
|
|
const companyId = computed(() => proxy.useUserStore().user.companyId);
|
|
|
const accountList = ref([]);
|
|
|
const customerList = ref([]);
|
|
@@ -507,6 +577,8 @@ const formData = reactive({
|
|
|
contractProductList: [],
|
|
|
companyId: "",
|
|
|
templateContent: "",
|
|
|
+ contractChannel: "",
|
|
|
+ paymentMethod: "",
|
|
|
},
|
|
|
});
|
|
|
const uploadData = ref({});
|
|
@@ -552,7 +624,7 @@ const formConfig = computed(() => {
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "code",
|
|
|
- label: "合同号",
|
|
|
+ label: "订单号",
|
|
|
disabled: true,
|
|
|
isShow: formData.data.code ? true : false,
|
|
|
},
|
|
@@ -638,6 +710,31 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
+ prop: "contractChannel",
|
|
|
+ label: "订单渠道",
|
|
|
+ data: contractChannel.value,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "channelCode",
|
|
|
+ label: "渠道订单编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow:
|
|
|
+ formData.data.contractChannel &&
|
|
|
+ formData.data.contractChannel.includes("阿里巴巴")
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "salesmanId",
|
|
|
+ label: "业务员",
|
|
|
+ data: userList.value,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
prop: "merchUserId",
|
|
|
label: "跟单员",
|
|
|
data: userList.value,
|
|
@@ -701,6 +798,14 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
+ prop: "taxPoints",
|
|
|
+ label: "税点",
|
|
|
+ data: taxPoints.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ isShow: formData.data.isTax && formData.data.isTax == "1" ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
prop: "isFreight",
|
|
|
label: "是否含运费",
|
|
|
data: [
|
|
@@ -715,28 +820,50 @@ const formConfig = computed(() => {
|
|
|
],
|
|
|
itemWidth: 25,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "rr",
|
|
|
+ // label: "结算方式",
|
|
|
+ // data: settlementWay.value,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // },
|
|
|
{
|
|
|
type: "select",
|
|
|
prop: "paymentMethod",
|
|
|
- label: "付款方式",
|
|
|
+ label: "客户付款方式",
|
|
|
data: fundsPaymentMethod.value,
|
|
|
itemWidth: 25,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // type: "select",
|
|
|
+ // prop: "paymentMethod",
|
|
|
+ // label: "付款方式",
|
|
|
+ // data: fundsPaymentMethod.value,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // },
|
|
|
{
|
|
|
- type: "number",
|
|
|
- prop: "advanceRatio",
|
|
|
- label: "预付款比列(%)",
|
|
|
- precision: 2,
|
|
|
- min: 0,
|
|
|
- controls: false,
|
|
|
+ type: "input",
|
|
|
+ prop: "alibabaCode",
|
|
|
+ label: "阿里巴巴订单编号",
|
|
|
+ itemType: "text",
|
|
|
itemWidth: 25,
|
|
|
+ isShow:
|
|
|
+ formData.data.paymentMethod &&
|
|
|
+ formData.data.paymentMethod.includes("阿里巴巴")
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
},
|
|
|
{
|
|
|
- type: "input",
|
|
|
- prop: "remark",
|
|
|
- label: "付款条件",
|
|
|
- itemType: "textarea",
|
|
|
- itemWidth: 100,
|
|
|
+ type: "select",
|
|
|
+ prop: "alibabaShopName",
|
|
|
+ label: "1688店铺名称",
|
|
|
+ data: shopName.value,
|
|
|
+ itemWidth: 25,
|
|
|
+ isShow:
|
|
|
+ formData.data.paymentMethod &&
|
|
|
+ formData.data.paymentMethod.includes("阿里巴巴")
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
@@ -747,8 +874,119 @@ const formConfig = computed(() => {
|
|
|
fn: (val) => {
|
|
|
changeShroffAccount(val);
|
|
|
},
|
|
|
+ isShow: formData.data.paymentMethod == "bank1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "accountName",
|
|
|
+ label: "户名",
|
|
|
+ placeholder: "请输入户名",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow:
|
|
|
+ formData.data.paymentMethod &&
|
|
|
+ formData.data.paymentMethod.includes("bank")
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "openingBank",
|
|
|
+ label: "开户行",
|
|
|
+ placeholder: "请输入开户行",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow:
|
|
|
+ formData.data.paymentMethod &&
|
|
|
+ formData.data.paymentMethod.includes("bank")
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "accountOpening",
|
|
|
+ label: "账号",
|
|
|
+ placeholder: "请输入账号",
|
|
|
+ itemWidth: 50,
|
|
|
+ isShow:
|
|
|
+ formData.data.paymentMethod &&
|
|
|
+ (formData.data.paymentMethod.includes("bank") ||
|
|
|
+ ["wxPay", "aliPay"].includes(formData.data.paymentMethod))
|
|
|
+ ? true
|
|
|
+ : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "remark",
|
|
|
+ label: "其他收款方式备注说明",
|
|
|
+ itemType: "textarea",
|
|
|
+ itemWidth: 100,
|
|
|
+ isShow: formData.data.paymentMethod == "other",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "advanceRatio",
|
|
|
+ prop: "",
|
|
|
+ label: "",
|
|
|
},
|
|
|
// {
|
|
|
+ // type: "number",
|
|
|
+ // prop: "advanceRatio",
|
|
|
+ // label: "定⾦⽐例",
|
|
|
+ // precision: 2,
|
|
|
+ // min: 0,
|
|
|
+ // max: 100,
|
|
|
+ // controls: false,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // fn: (val) => {
|
|
|
+ // if (val && formData.data.beforeShipmentRatio) {
|
|
|
+ // let total = val + formData.data.beforeShipmentRatio;
|
|
|
+ // if (total > 100) {
|
|
|
+ // formData.data.advanceRatio = null;
|
|
|
+ // formData.data.beforeShipmentRatio = null;
|
|
|
+ // }
|
|
|
+ // formData.data.afterShipmentRatio = 100 - total;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "number",
|
|
|
+ // prop: "beforeShipmentRatio",
|
|
|
+ // label: "出货前付款⽐例",
|
|
|
+ // precision: 2,
|
|
|
+ // min: 0,
|
|
|
+ // max: 100,
|
|
|
+ // controls: false,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // fn: (val) => {
|
|
|
+ // if (val && formData.data.advanceRatio) {
|
|
|
+ // let total = val + formData.data.advanceRatio;
|
|
|
+ // if (total > 100) {
|
|
|
+ // formData.data.advanceRatio = null;
|
|
|
+ // formData.data.beforeShipmentRatio = null;
|
|
|
+ // }
|
|
|
+ // formData.data.afterShipmentRatio = 100 - total;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "number",
|
|
|
+ // prop: "afterShipmentRatio",
|
|
|
+ // label: "出货后尾款⽐例",
|
|
|
+ // precision: 2,
|
|
|
+ // min: 0,
|
|
|
+ // max: 100,
|
|
|
+ // controls: false,
|
|
|
+ // itemWidth: 25,
|
|
|
+ // disabled: true,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "remark",
|
|
|
+ // label: "付款条件",
|
|
|
+ // itemType: "textarea",
|
|
|
+ // itemWidth: 100,
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
// type: "input",
|
|
|
// prop: "beneficiaryName",
|
|
|
// label: " ",
|
|
@@ -796,30 +1034,7 @@ const formConfig = computed(() => {
|
|
|
// 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",
|
|
@@ -832,6 +1047,12 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "date",
|
|
|
+ prop: "saleDate",
|
|
|
+ label: "销售日期",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
prop: "deliveryTime",
|
|
|
label: "交货期限",
|
|
|
itemWidth: 50,
|
|
@@ -843,6 +1064,13 @@ const formConfig = computed(() => {
|
|
|
data: shippingMethod.value,
|
|
|
itemWidth: 50,
|
|
|
},
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "taxTransportationWay",
|
|
|
+ label: "税运⽅式",
|
|
|
+ data: taxTransportationWay.value,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
// {
|
|
|
// type: "input",
|
|
|
// prop: "transportRemark",
|
|
@@ -876,25 +1104,39 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "合同总金额",
|
|
|
+ title: "订单总金额",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "amount",
|
|
|
- label: "合同总金额",
|
|
|
+ label: "订单总⾦额",
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "factoryAmount",
|
|
|
+ label: "出⼚总⾦额",
|
|
|
+ itemWidth: 25,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "grossProfit",
|
|
|
+ label: "合计⽑利",
|
|
|
itemWidth: 25,
|
|
|
disabled: true,
|
|
|
},
|
|
|
{
|
|
|
type: "title",
|
|
|
- title: "合同模板",
|
|
|
+ title: "订单模板",
|
|
|
haveLine: true,
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
prop: "contractTemplateId",
|
|
|
- label: "合同模板",
|
|
|
+ label: "订单模板",
|
|
|
data: templateList.value,
|
|
|
itemWidth: 50,
|
|
|
fn: (val) => {
|
|
@@ -914,6 +1156,7 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
+
|
|
|
const rules = ref({
|
|
|
ofCompanyId: [
|
|
|
{ required: true, message: "请选择业务公司", trigger: "change" },
|
|
@@ -930,6 +1173,7 @@ const rules = ref({
|
|
|
{ required: true, message: "请选择订单归属", trigger: "change" },
|
|
|
],
|
|
|
merchUserId: [{ required: true, message: "请选择跟单员", trigger: "change" }],
|
|
|
+ salesmanId: [{ required: true, message: "请选择业务员", trigger: "change" }],
|
|
|
isTax: [{ required: true, message: "请选择是否含税", trigger: "change" }],
|
|
|
isFreight: [
|
|
|
{ required: true, message: "请选择是否含运费", trigger: "change" },
|
|
@@ -964,7 +1208,9 @@ const rules = ref({
|
|
|
transportMethod: [
|
|
|
{ required: true, message: "请选择运输方式", trigger: "change" },
|
|
|
],
|
|
|
- // remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
|
|
|
+ remark: [
|
|
|
+ { required: true, message: "请输入其他收款方式备注说明", trigger: "blur" },
|
|
|
+ ],
|
|
|
rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
|
|
|
shroffAccountId: [
|
|
|
{ required: true, message: "请选择收款账号", trigger: "change" },
|
|
@@ -975,6 +1221,29 @@ const rules = ref({
|
|
|
templateContent: [
|
|
|
{ required: true, message: "请输入模板内容", trigger: "blur" },
|
|
|
],
|
|
|
+ contractChannel: [
|
|
|
+ { required: true, message: "请选择订单渠道", trigger: "change" },
|
|
|
+ ],
|
|
|
+ channelCode: [
|
|
|
+ { required: true, message: "请输入订单渠道编号", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ saleDate: [{ required: true, message: "请选择销售日期", trigger: "change" }],
|
|
|
+ taxTransportationWay: [
|
|
|
+ { required: true, message: "请选择税运方式", trigger: "change" },
|
|
|
+ ],
|
|
|
+ beforeShipmentRatio: [
|
|
|
+ { required: true, message: "请输入出货前付款比例", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ afterShipmentRatio: [
|
|
|
+ { required: true, message: "请输入出货后付款比例", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ taxPoints: [{ required: true, message: "请选择税点", trigger: "change" }],
|
|
|
+ alibabaCode: [
|
|
|
+ { required: true, message: "请输入阿里巴巴编号", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ alibabaShopName: [
|
|
|
+ { required: true, message: "请选择1688店铺名称", trigger: "change" },
|
|
|
+ ],
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
proxy
|
|
@@ -1177,6 +1446,39 @@ const changeCustomer = (val) => {
|
|
|
formData.data.buyAddress = "";
|
|
|
}
|
|
|
};
|
|
|
+const changeAdvanceRatio = (val, flag) => {
|
|
|
+ if (val && flag) {
|
|
|
+ if (formData.data.beforeShipmentRatio > 0) {
|
|
|
+ let total = Number(
|
|
|
+ parseFloat(val + formData.data.beforeShipmentRatio).toFixed(2)
|
|
|
+ );
|
|
|
+ if (total > 100) {
|
|
|
+ formData.data.advanceRatio = null;
|
|
|
+ formData.data.beforeShipmentRatio = null;
|
|
|
+ formData.data.afterShipmentRatio = null;
|
|
|
+ } else {
|
|
|
+ formData.data.afterShipmentRatio = Number(
|
|
|
+ parseFloat(100 - total).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (val && !flag) {
|
|
|
+ if (formData.data.advanceRatio > 0) {
|
|
|
+ let total = Number(
|
|
|
+ parseFloat(val + formData.data.advanceRatio).toFixed(2)
|
|
|
+ );
|
|
|
+ if (total > 100) {
|
|
|
+ formData.data.advanceRatio = null;
|
|
|
+ formData.data.beforeShipmentRatio = null;
|
|
|
+ formData.data.afterShipmentRatio = null;
|
|
|
+ } else {
|
|
|
+ formData.data.afterShipmentRatio = Number(
|
|
|
+ parseFloat(100 - total).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
const createFilter = (queryString) => {
|
|
|
return (restaurant) => {
|
|
|
return (
|
|
@@ -1244,15 +1546,20 @@ const selectProduct = async (goods) => {
|
|
|
formData.data.contractProductList.push({
|
|
|
fileUrl: fileUrl,
|
|
|
productId: goods.id,
|
|
|
- productCnName: goods.name,
|
|
|
+ productClassifyName: goods.classifyName,
|
|
|
+ productName: goods.name,
|
|
|
productCode: goods.customCode,
|
|
|
productLength: goods["length"],
|
|
|
productWidth: goods.width,
|
|
|
productHeight: goods.height,
|
|
|
productColor: goods.color,
|
|
|
+ productNetWeight: goods.netWeight,
|
|
|
+ productUnit: goods.unit,
|
|
|
+ productFrontalTexture: goods.frontalTexture,
|
|
|
prodFilePath: goods.prodFilePath,
|
|
|
quantity: null,
|
|
|
price: goods.price || null,
|
|
|
+ factoryPrice: goods.factoryPrice || null,
|
|
|
amount: "",
|
|
|
remark: "",
|
|
|
fileList: [],
|
|
@@ -1313,6 +1620,7 @@ const selectMaterial = (goods) => {
|
|
|
};
|
|
|
|
|
|
const changeProductPrice = () => {
|
|
|
+ return;
|
|
|
let productIds = formData.data.contractProductList.map((x) => x.productId);
|
|
|
if (productIds && productIds.length > 0) {
|
|
|
proxy
|
|
@@ -1375,29 +1683,28 @@ const handleDeleteMaterial = (index, sonIndex) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-const calculationAmount = (att = "") => {
|
|
|
- nextTick(() => {
|
|
|
- if (
|
|
|
- formData.data.contractProductList &&
|
|
|
- formData.data.contractProductList.length > 0
|
|
|
- ) {
|
|
|
- for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
- let money = 0;
|
|
|
- money = parseFloat(
|
|
|
- Number(formData.data.contractProductList[i].quantity) *
|
|
|
- Number(formData.data.contractProductList[i].price)
|
|
|
- ).toFixed(2);
|
|
|
- formData.data.contractProductList[i].amount = money;
|
|
|
- }
|
|
|
+const calculationAmount = () => {
|
|
|
+ if (
|
|
|
+ formData.data.contractProductList &&
|
|
|
+ formData.data.contractProductList.length > 0
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
+ formData.data.contractProductList[i].amount = parseFloat(
|
|
|
+ Number(formData.data.contractProductList[i].quantity) *
|
|
|
+ Number(formData.data.contractProductList[i].price)
|
|
|
+ ).toFixed(2);
|
|
|
+ formData.data.contractProductList[i].amountTwo = parseFloat(
|
|
|
+ Number(formData.data.contractProductList[i].quantity) *
|
|
|
+ Number(formData.data.contractProductList[i].factoryPrice)
|
|
|
+ ).toFixed(2);
|
|
|
}
|
|
|
- nextTick(() => {
|
|
|
- totalAmount();
|
|
|
- });
|
|
|
- });
|
|
|
+ }
|
|
|
+ totalAmount();
|
|
|
};
|
|
|
|
|
|
const totalAmount = () => {
|
|
|
let money = 0;
|
|
|
+ let moneyTwo = 0;
|
|
|
if (
|
|
|
formData.data.contractProductList &&
|
|
|
formData.data.contractProductList.length > 0
|
|
@@ -1408,6 +1715,12 @@ const totalAmount = () => {
|
|
|
Number(money) + Number(formData.data.contractProductList[i].amount)
|
|
|
).toFixed(2);
|
|
|
}
|
|
|
+ if (formData.data.contractProductList[i].amountTwo) {
|
|
|
+ moneyTwo = parseFloat(
|
|
|
+ Number(moneyTwo) +
|
|
|
+ Number(formData.data.contractProductList[i].amountTwo)
|
|
|
+ ).toFixed(2);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (
|
|
@@ -1423,6 +1736,10 @@ const totalAmount = () => {
|
|
|
}
|
|
|
}
|
|
|
formData.data.amount = money;
|
|
|
+ formData.data.factoryAmount = moneyTwo;
|
|
|
+ formData.data.grossProfit = parseFloat(
|
|
|
+ Number(formData.data.amount) - Number(formData.data.factoryAmount)
|
|
|
+ ).toFixed(2);
|
|
|
};
|
|
|
const clickAdd = () => {
|
|
|
if (
|
|
@@ -1775,6 +2092,7 @@ const getAllData = (businessId) => {
|
|
|
});
|
|
|
changeProductPrice();
|
|
|
}
|
|
|
+ calculationAmount();
|
|
|
if (formData.data.countryId) {
|
|
|
getCityData(formData.data.countryId, "20");
|
|
|
}
|
|
@@ -1844,7 +2162,7 @@ const getPriceSheetData = (id) => {
|
|
|
quotationProductId: x.id,
|
|
|
fileUrl: "",
|
|
|
productId: x.productId,
|
|
|
- productCnName: x.productName,
|
|
|
+ productName: x.productName,
|
|
|
productCode: x.productCode,
|
|
|
productLength: x.productLength,
|
|
|
productWidth: x.productWidth,
|