Commit 89404983 authored by 我在何方's avatar 我在何方
parents 456565a2 1f3c1889
...@@ -4,3 +4,5 @@ ...@@ -4,3 +4,5 @@
本地运行:npm run dev 本地运行:npm run dev
测试环境:npm run build:dev 测试环境:npm run build:dev
生产环境:npm run build:prod 生产环境:npm run build:prod
vue node14
\ No newline at end of file
...@@ -458,3 +458,9 @@ export function dataURLtoBlob(base64Data) { ...@@ -458,3 +458,9 @@ export function dataURLtoBlob(base64Data) {
}); });
return blob; return blob;
} }
// 将字符串转成数组
export function str2arr(str, separator = ','){
if(!str) return []
return str.split(separator).filter(item => item)
}
\ No newline at end of file
...@@ -33,24 +33,24 @@ ...@@ -33,24 +33,24 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="date"> <el-form-item label="" prop="dateType">
<el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small"> <el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" /> <el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')"> <el-form-item :label="$t('状态')" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" :placeholder="$t('请选择状态')" clearable size="small"> <el-select v-model="queryParams.boxStatus" :placeholder="$t('请选择状态')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_ORDER_SHIPMENT_STATE)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" /> <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_ORDER_SHIPMENT_STATE)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')"> <el-form-item :label="$t('国家')" prop="countryId">
<el-select v-model="queryParams.countryId" :placeholder="$t('请选择国家')"> <el-select v-model="queryParams.countryId" :placeholder="$t('请选择国家')" clearable size="small">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id"> <el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers"/> <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'"> <template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" /> <ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
...@@ -350,10 +350,14 @@ export default { ...@@ -350,10 +350,14 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = {};
this.dateRangeCreateTime = []; this.dateRangeCreateTime = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
resetForm() {
this.$refs["queryForm"].resetFields();
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$set(this.dialogCfg, "title", this.$t("添加出货")); this.$set(this.dialogCfg, "title", this.$t("添加出货"));
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
{{ scope.row.loadWeight }}kg {{ scope.row.loadWeight }}kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t(' 跟进客服')" align="center" prop="" /> <el-table-column :label="$t('客户经理')" align="center" prop="salesmanId" />
<el-table-column :label="$t('制作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('制作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 0 (未制作提货单) 1(审核中) 2(审核通过) 3(审核拒绝) --> <!-- 0 (未制作提货单) 1(审核中) 2(审核通过) 3(审核拒绝) -->
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
getSumData() { getSumData() {
return `${this.billData.totalNum ?? 0} ${ return `${this.billData.totalNum ?? 0} ${
this.billData.totalVolume ?? 0 this.billData.totalVolume ?? 0
}m³ ${this.billData.totalVolume ?? 0}kg`; }m³ ${this.billData.totalWeight ?? 0}kg`;
}, },
/* 容量 */ /* 容量 */
calcCapacity() { calcCapacity() {
......
...@@ -64,7 +64,9 @@ ...@@ -64,7 +64,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType"> <el-table-column :label="$t('报关方式')" align="center" prop="customsType">
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('计划箱数')" align="center" prop="num"> <el-table-column :label="$t('计划箱数')" align="center" prop="num">
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-row class="table-title"> <el-row class="table-title">
<div>{{item.orderNo}}</div> <div>{{item.orderNo}}</div>
<div>{{$t('发往')}}:{{item.destWarehouseName}}</div> <div>{{$t('发往')}}:{{item.destWarehouseName}}</div>
<div> <div :class="item.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</div> </div>
<div>{{$t('入仓时间')}}:{{formatDate(item.rucangTime)}}</div> <div>{{$t('入仓时间')}}:{{formatDate(item.rucangTime)}}</div>
......
...@@ -147,7 +147,9 @@ ...@@ -147,7 +147,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType" width="120"> <el-table-column :label="$t('报关方式')" align="center" prop="customsType" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('备案')" align="center" prop="productRecord" width="100"> <el-table-column :label="$t('备案')" align="center" prop="productRecord" width="100">
...@@ -205,7 +207,7 @@ ...@@ -205,7 +207,7 @@
<p>{{item.destWarehouseName}}</p> <p>{{item.destWarehouseName}}</p>
</div> </div>
<div> <div>
<p> <p :class="item.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</p> </p>
</div> </div>
...@@ -247,7 +249,9 @@ ...@@ -247,7 +249,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop=""> <el-table-column :label="$t('报关方式')" align="center" prop="">
<div :class="item.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</div>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')" align="center" prop=""> <el-table-column :label="$t('包装类型')" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -379,7 +383,11 @@ export default { ...@@ -379,7 +383,11 @@ export default {
// 校验 // 校验
rules: { rules: {
noticeUser: [ noticeUser: [
{ required: true, message: this.$t("目的地操作员必填"), trigger: "change" }, {
required: true,
message: this.$t("目的地操作员必填"),
trigger: "change",
},
], ],
}, },
// 出货信息 // 出货信息
...@@ -426,7 +434,7 @@ export default { ...@@ -426,7 +434,7 @@ export default {
/* 获取城市 */ /* 获取城市 */
importCityName(id) { importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id); var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? this.$l(arr[0], 'title') : this.$t(""); return arr.length > 0 ? this.$l(arr[0], "title") : this.$t("");
}, },
/* 选中行 */ /* 选中行 */
checkboxSelect(selection, part) { checkboxSelect(selection, part) {
...@@ -472,7 +480,8 @@ export default { ...@@ -472,7 +480,8 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.queryParams = {};
this.$refs["queryForm"].resetFields();
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit() {
...@@ -559,9 +568,13 @@ export default { ...@@ -559,9 +568,13 @@ export default {
}, },
/* 删除部分 */ /* 删除部分 */
deletePart(part) { deletePart(part) {
this.$confirm(this.$t("确认删除该部分及其已预装订单?"), this.$t("提示"), { this.$confirm(
this.$t("确认删除该部分及其已预装订单?"),
this.$t("提示"),
{
type: "warning", type: "warning",
}) }
)
.then((_) => { .then((_) => {
deleteSection(part.id).then((res) => { deleteSection(part.id).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
...@@ -583,10 +596,11 @@ export default { ...@@ -583,10 +596,11 @@ export default {
), ),
}; };
createGoods(params).then((res) => { createGoods(params)
.then((res) => {
const { data } = res; const { data } = res;
if(data.relationMsg) { if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(',',""); const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), { this.$confirm(msg, this.$t("提示"), {
type: "warning", type: "warning",
}) })
...@@ -594,27 +608,28 @@ export default { ...@@ -594,27 +608,28 @@ export default {
loadRelationOrder(data).then((res) => { loadRelationOrder(data).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}) });
}) });
}) })
.catch((_) => {}); .catch((_) => {});
} else { } else {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}) });
} }
}).catch((res) => { })
if(res.code === 555) { .catch((res) => {
const msg = res.msg && res.msg.replaceAll(',',""); if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), { this.$confirm(msg, this.$t("提示"), {
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
createGoods({...params, relationStatus: 1}).then((res) => { createGoods({ ...params, relationStatus: 1 }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}) });
}) });
}) })
.catch((_) => {}); .catch((_) => {});
} }
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType"> <el-table-column :label="$t('报关方式')" align="center" prop="customsType">
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num"> <el-table-column :label="$t('箱数')" align="center" prop="num">
......
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType"> <el-table-column :label="$t('报关方式')" align="center" prop="customsType">
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum" /> <el-table-column :label="$t('实装箱数')" align="center" prop="installNum" />
......
...@@ -121,6 +121,9 @@ export default { ...@@ -121,6 +121,9 @@ export default {
<style lang="scss"> <style lang="scss">
// 海运操作统一弹窗样式 // 海运操作统一弹窗样式
.shipping-dialog { .shipping-dialog {
.custom_type_red {
color: red;
}
.el-dialog__body { .el-dialog__body {
height: calc(100% - 54px); height: calc(100% - 54px);
> :first-child { > :first-child {
......
<script>
import Edit from './edit'
Edit.name = 'CouponDetail'
export default Edit
</script>
\ No newline at end of file
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" > <!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> --> </el-select> -->
<selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 2" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" /> <selector v-if="form.type == 2" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
...@@ -77,12 +77,12 @@ ...@@ -77,12 +77,12 @@
<template v-if="form.type==7"> <template v-if="form.type==7">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" /> > <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" /> <el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
{{$t('价格')}} {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6"> <template v-if="form.type == 6">
/ /
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1"> <template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}} {{$t('')}}
<el-input v-model="item.fullAmount" @keyup.native="checkPositive(item, 'fullAmount')" style="width:100px" /> <el-input v-model="item.fullAmount" @keyup.native="checkPositive(item, 'fullAmount')" style="width:100px" />
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="syncClearanceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
...@@ -110,18 +110,18 @@ ...@@ -110,18 +110,18 @@
<el-input v-if="[2,3,4].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'reduceAmount')" v-model="item.reduceAmount" style="width:100px" /> <el-input v-if="[2,3,4].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'reduceAmount')" v-model="item.reduceAmount" style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :disabled="form.type==2" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span> <span v-if="[4].indexOf(form.type) > -1">%</span>
</template> </template>
<template v-if="form.type==7"> <template v-if="form.type==7">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" /> > <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" /> <el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<Selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <Selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
{{$t('价格')}} {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6"> <template v-if="form.type == 6">
/ /
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[2].push({type:2})" /> <el-button class="el-icon-plus" size="mini" type="primary" @click="fee[2].push({type:2})" />
<el-button v-if="fee[2].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[2].splice(index,1)" /> <el-button v-if="fee[2].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[2].splice(index,1)" />
<div class="red-tips" v-if="errTips[2] && errTips[1][index]">{{errTips[2][index]}}</div> <!-- <div class="red-tips" v-if="errTips[2] && errTips[1][index]">{{errTips[2][index]}}</div> -->
</div> </div>
</el-form-item> </el-form-item>
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
v-model="form.isSimilarSuperposition" v-model="form.isSimilarSuperposition"
formatter="bool" formatter="bool"
:placeholder="$t('请选择类型')" :placeholder="$t('请选择类型')"
defaultable
/> />
</el-form-item> </el-form-item>
...@@ -182,7 +183,7 @@ ...@@ -182,7 +183,7 @@
v-if="form.type != 1" v-if="form.type != 1"
> >
<!---第一个不是全部,所以不能使用defaultable--> <!---第一个不是全部,所以不能使用defaultable-->
<dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" formatter="number" /> <dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" formatter="number" defaultable />
<routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" /> <routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -259,6 +260,8 @@ import RoutersSelector from '@/components/RoutersSelector' ...@@ -259,6 +260,8 @@ import RoutersSelector from '@/components/RoutersSelector'
import ProductsSelector from '@/components/ProductsSelector' import ProductsSelector from '@/components/ProductsSelector'
import Editor from '@/components/Editor' import Editor from '@/components/Editor'
import Selector from '@/components/Selector/index' import Selector from '@/components/Selector/index'
import {parseTime} from '@/utils/ruoyi'
import {str2arr} from '@/utils/index'
export default { export default {
...@@ -279,7 +282,7 @@ export default { ...@@ -279,7 +282,7 @@ export default {
readonly: false, readonly: false,
// 表单参数 // 表单参数
form: { form: {
status: 1, status: 1
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -302,6 +305,7 @@ export default { ...@@ -302,6 +305,7 @@ export default {
}, },
errTips: {}, // 跟fee对应的错误提示 errTips: {}, // 跟fee对应的错误提示
isAllProduct: false, // 是否全部商品 isAllProduct: false, // 是否全部商品
initing: false, // 初始化中,编辑或者查看的时候,初始化中修改type不改默认值
}; };
}, },
computed:{ computed:{
...@@ -332,7 +336,7 @@ export default { ...@@ -332,7 +336,7 @@ export default {
for(let type in this.fee){ for(let type in this.fee){
let feeList = this.fee[type] let feeList = this.fee[type]
feeList.forEach(item => { feeList.forEach(item => {
if(item.reduceAmount){ if(item.reduceAmount || item.netReceiptsAmount){
costType = type costType = type
return false return false
} }
...@@ -369,13 +373,22 @@ export default { ...@@ -369,13 +373,22 @@ export default {
if(val && val != 1){ if(val && val != 1){
this.getCouponSelect() this.getCouponSelect()
if(!this.initing){
// 非优惠券给默认数据 // 非优惠券给默认数据
this.$set(this.form, 'documentDeclarationArr', ["1"]) this.$set(this.form, 'documentDeclarationArr', ["1", "2", "3"])
this.$set(this.form, 'isCargoControlArr', ["0"]) this.$set(this.form, 'isCargoControlArr', ["0", "1"])
this.$set(this.form, 'orderAttrArr', ["2","3","1"]) this.$set(this.form, 'orderAttrArr', ["2","3","1"])
this.$set(this.form, 'brandArr', ["0","1"]) this.$set(this.form, 'brandArr', ["0","1", "2"])
this.$set(this.form, 'suitableLineType', 0) this.$set(this.form, 'suitableLineType', 0)
} }
}
// 过一遍费用,禁用/启用、同步 部分货币单位
[1,2].forEach(index => {
this.fee[index].forEach(item => {
this.checkReduceCurrency(item)
})
})
}, },
'form.isSimilarSuperposition'(val){ 'form.isSimilarSuperposition'(val){
if(val){ if(val){
...@@ -407,8 +420,12 @@ export default { ...@@ -407,8 +420,12 @@ export default {
} }
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) { if (this.$route.query.id) {
this.initing = true
getCoupon(this.$route.query.id).then((res) => { getCoupon(this.$route.query.id).then((res) => {
this.form = res.data this.form = res.data;
['orderAttr', 'isCargoControl', 'brand', 'documentDeclaration'].forEach(field => {
this.$set(this.form, field + 'Arr', str2arr(res.data[field]))
})
// 没有商品则表示全部 // 没有商品则表示全部
if(!this.form.prodIds){ if(!this.form.prodIds){
...@@ -455,6 +472,10 @@ export default { ...@@ -455,6 +472,10 @@ export default {
this.fee[type] = [{type}] this.fee[type] = [{type}]
} }
}) })
}).finally(() => {
this.$nextTick(() => {
this.initing = false
})
}) })
} }
// 不是编辑查看则给默认的费用表格 // 不是编辑查看则给默认的费用表格
...@@ -475,19 +496,52 @@ export default { ...@@ -475,19 +496,52 @@ export default {
}, },
// 满减活动如果选择的满多少金额减,则在选择满货币后需要同步减的货币,且禁用减的货币修改 // 满减活动如果选择的满多少金额减,则在选择满货币后需要同步减的货币,且禁用减的货币修改
checkReduceCurrency(item){ checkReduceCurrency(item){
if(this.form.type == 2 && item.combUnit.split('_')[0] == 'fullCurrencyId'){ // 金额满减
if(this.form.type == 2){
// 只要不是按产品单位满减
if(!item.combUnit || item.combUnit.split('_')[0] != 'prodUnit'){
this.$set(item, 'reduceCurrencyDisabled', true) this.$set(item, 'reduceCurrencyDisabled', true)
this.$set(item, 'reduceCurrencyId', +item.combUnit.split('_')[1]) let currencyId = +item.fullCurrencyId
if(!currencyId && item.combUnit){
currencyId = +item.combUnit.split('_')[1]
}
if(!currencyId){
currencyId = this.currencyList[0].id
}
this.$set(item, 'reduceCurrencyId', currencyId)
}
return return
} }
// 优惠
if(this.form.type == 5){
if(!item.fullCurrencyId){
this.$set(item, 'fullCurrencyId', this.currencyList[0].id)
}
this.$set(item, 'reduceCurrencyDisabled', true)
this.$set(item, 'netReceiptsCurrencyId', +item.fullCurrencyId)
return
}
// 区间价
if(this.form.type== 7){
if(!item.startAndEndCurrencyId){
this.$set(item, 'startAndEndCurrencyId', this.currencyList[0].id)
}
this.$set(item, 'reduceCurrencyDisabled', true)
this.$set(item, 'netReceiptsCurrencyId', +item.startAndEndCurrencyId)
return
}
if(item.reduceCurrencyDisabled){ if(item.reduceCurrencyDisabled){
this.$set(item, 'reduceCurrencyDisabled', false) this.$set(item, 'reduceCurrencyDisabled', false)
} }
}, },
getCouponSelect(){ getCouponSelect(){
getCouponSelect().then(res => { getCouponSelect({overdueStatus: 1, status: 1}).then(res => {
this.couponList = res.data this.couponList = res.data
}) })
}, },
...@@ -593,7 +647,7 @@ export default { ...@@ -593,7 +647,7 @@ export default {
let data = Object.assign({}, this.form, {discountDetailedVOs}) let data = Object.assign({}, this.form, {discountDetailedVOs})
// 开始时间必填 // 开始时间必填
if(!data.startTime)data.startTime = '2022-01-01 00:00:00' if(!data.startTime)data.startTime = parseTime(Date.now()) // '2022-01-01 00:00:00'
// status必填 // status必填
data.status = status data.status = status
data.couponIds = this.couponIds.join(',') data.couponIds = this.couponIds.join(',')
...@@ -604,7 +658,7 @@ export default { ...@@ -604,7 +658,7 @@ export default {
} }
// 没勾选全部就需要选择商品 // 没勾选全部就需要选择商品
if(!this.isAllProduct && !this.form.prodIds){ if(this.form.type != 1 && !this.isAllProduct && !this.form.prodIds){
return this.$message.error('请选择商品') return this.$message.error('请选择商品')
} }
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, true)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)"
v-hasPermi="['ecw:coupon:update']">查看</el-button> v-hasPermi="['ecw:coupon:update']">查看</el-button>
<el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:coupon:update']">编辑</el-button> v-hasPermi="['ecw:coupon:update']">编辑</el-button>
...@@ -287,6 +287,9 @@ export default { ...@@ -287,6 +287,9 @@ export default {
} }
return this.$router.push(url) return this.$router.push(url)
}, },
handleDetail(row){
this.$router.push('detail?id=' + row.couponId + '&readonly=1')
},
handleCopy(row){ handleCopy(row){
this.$router.push('edit?action=copy&id=' + row.couponId) this.$router.push('edit?action=copy&id=' + row.couponId)
}, },
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(!!(customerId !== '0' && form.customerService) || isCustomerServiceConfirmed)"> <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(customerId !== '0' || isCustomerServiceConfirmed)">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<span>{{ parseTime(scope.row.enterOpenSeaTime) }}</span> <span>{{ parseTime(scope.row.enterOpenSeaTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column> </el-table-column>
<el-table-column :label="$t('出货渠道')"> <el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}"> <template slot-scope="{row}">
...@@ -609,14 +609,6 @@ export default { ...@@ -609,14 +609,6 @@ export default {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return country?.nameZh
}, },
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column> </el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
...@@ -414,10 +414,6 @@ export default { ...@@ -414,10 +414,6 @@ export default {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return country?.nameZh
}, },
customerServiceFn(row){
let obj = this.serviceStaffOptions.find(item => item.id === row.customerService)
return obj ? obj.nickname : '';
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column> </el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
...@@ -159,9 +159,11 @@ import {listServiceUser} from "@/api/system/user"; ...@@ -159,9 +159,11 @@ import {listServiceUser} from "@/api/system/user";
import {getCountryListAll} from "@/api/ecw/country"; import {getCountryListAll} from "@/api/ecw/country";
import {getCreditPage} from "@/api/customer/credit"; import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer"; import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "customerToBeAssigned", name: "customerToBeAssigned",
components: { components: {
Template,
upload, upload,
transferCustomer transferCustomer
}, },
...@@ -426,14 +428,6 @@ export default { ...@@ -426,14 +428,6 @@ export default {
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
}, },
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
}
}, },
watch:{ watch:{
selectCustomerList(val){ selectCustomerList(val){
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column> </el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
...@@ -227,14 +227,6 @@ export default { ...@@ -227,14 +227,6 @@ export default {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return country?.nameZh
}, },
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName" >
</el-table-column> </el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
...@@ -393,14 +393,6 @@ export default { ...@@ -393,14 +393,6 @@ export default {
this.isBatch = false; this.isBatch = false;
}, },
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
transferFn(val){ transferFn(val){
if(!this.service){ if(!this.service){
return this.$message.warning(this.$t('请选择客户经理!')); return this.$message.warning(this.$t('请选择客户经理!'));
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-row v-if="!form.charging"> <el-row v-if="!form.charging">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('运费')"> <el-form-item :label="$t('运费')">
{{form.seaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }} {{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item :label="$t('全包价')" v-if="form.charging"> <el-form-item :label="$t('全包价')" v-if="form.charging">
{{form.seaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }} {{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('佣金类型')" prop="commissionType"> <el-form-item :label="$t('佣金类型')" prop="commissionType">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" /> <dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" />
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div class="item"> <div class="item">
{{$t('佣金规则')}}{{$t('从【{oldType}】改为【{newType}', { {{$t('佣金规则')}}{{$t('从【{oldType}】改为【{newType}', {
oldType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, offer.commissionType) , oldType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, form.orgCommissionType) ,
newType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, form.commissionType), newType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, form.commissionType),
})}} })}}
</div> </div>
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
<el-descriptions-item :label="$t('申请理由')" v-if="type == 1 || type == 2" :span="4"> <el-descriptions-item :label="$t('申请理由')" v-if="type == 1 || type == 2" :span="4">
<div class="bold"> <div class="bold">
<div> <div>
{{$t('原运费')}}{{detail.orgFreight}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }} {{detail.charging ? $t('原全包价') : $t('原运费')}}{{detail.orgFreight}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }}
{{$t('新运费')}}{{detail.freight}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }} {{detail.charging ? $t('新全包价') : $t('新运费')}}{{detail.freight}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }}
</div> </div>
<div> <div v-if="!detail.charging">
{{$t('原清关费')}}{{detail.orgClearanceFreight}} {{ currencyMap[detail.clearanceFreightCurrency] }} / {{ unitMap[detail.clearanceFreightVolume] }} {{$t('原清关费')}}{{detail.orgClearanceFreight}} {{ currencyMap[detail.clearanceFreightCurrency] }} / {{ unitMap[detail.clearanceFreightVolume] }}
{{$t('新清关费')}}{{detail.clearanceFreight}} {{ currencyMap[detail.clearanceFreightCurrency] }} / {{ unitMap[detail.clearanceFreightVolume] }} {{$t('新清关费')}}{{detail.clearanceFreight}} {{ currencyMap[detail.clearanceFreightCurrency] }} / {{ unitMap[detail.clearanceFreightVolume] }}
</div> </div>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
<div class="item"> <div class="item">
{{$t('佣金规则')}}{{$t('从【{oldType}】改为【{newType}', { {{$t('佣金规则')}}{{$t('从【{oldType}】改为【{newType}', {
oldType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, detail.commissionType) , oldType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, detail.orgCommissionType) ,
newType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, detail.commissionType), newType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, detail.commissionType),
})}} })}}
</div> </div>
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
{{$t('原运费')}}{{detail.orgFreight}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}} {{$t('原运费')}}{{detail.orgFreight}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
</div> </div>
<div> <div>
{{$t('新运费')}}{{Decimal(detail.orgFreight || 0).minus(detail.lightCommissionAmount || 0).plus(detail.lightCommissionAmount || 0)}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}} {{$t('新运费')}}{{Decimal(detail.orgFreight || 0).minus(detail.orgLightCommissionAmount || 0).plus(detail.lightCommissionAmount || 0)}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
</div> </div>
<div> <div>
{{$t('成本价')}}{{Decimal(detail.orgFreight || 0).minus(detail.lightCommissionAmount || 0).minus(detail.shadeCommissionAmount || 0)}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }} {{$t('成本价')}}{{Decimal(detail.orgFreight || 0).minus(detail.orgLightCommissionAmount || 0).minus(detail.shadeCommissionAmount || 0)}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }}
</div> </div>
<div> <div>
{{$t('明佣')}}{{ detail.lightCommissionAmount}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}} {{$t('明佣')}}{{ detail.lightCommissionAmount}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
......
...@@ -811,6 +811,9 @@ export default { ...@@ -811,6 +811,9 @@ export default {
}) })
} }
}, },
'form.isCargoControl'(isCargoControl){
this.$set(this.form, 'drawee', isCargoControl ? 1 : 2)
},
/* 'form.orderItemVOList'(){ /* 'form.orderItemVOList'(){
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList) console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */ }, */
......
...@@ -146,8 +146,22 @@ ...@@ -146,8 +146,22 @@
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight"> <el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}"> <template slot-scope="{row}">
<!--入仓前是填单数据,入仓后是入仓数据--> <!--入仓前是填单数据,入仓后是入仓数据-->
<template v-if="row.inWarehouseState <= 1">{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</template> <component
<template v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template> :is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
:style="{
color: row.orderType == 2 ? 'red' : null
}"
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
<div v-if="row.inWarehouseState <= 1">{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</div>
<div v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
</component>
<!-- <el-tooltip v-if="scope.row.orderExceptionType=='order_heavy_cargo_exception'" class="item" effect="dark" :content="(scope.row.wvolume||0)+'m³'" placement="bottom">
<span style="color:#ff4949" v-if="scope.row.orderStatus >= 5 ">{{scope.row.volume+"m³/"+scope.row.weight+"kg"}}</span>
<span style="color:#ff4949" v-else>{{scope.row.totalVolume+"m³/"+scope.row.totalWeight+"kg"}}</span>
</el-tooltip> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName"> <el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('运费')"> <el-form-item :label="$t('运费')">
<!-- {{orderItem.oneSeaFreight}} --> <!-- {{orderItem.oneSeaFreight}} -->
{{originPrice}} {{form.orgFreight}}
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</el-row> </el-row>
<el-form-item :label="$t('全包价')" v-if="orderItem.charging"> <el-form-item :label="$t('全包价')" v-if="orderItem.charging">
{{orderItem.oneSeaFreight}} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }} {{form.orgFreight}} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('佣金类型')" prop="commissionType"> <el-form-item :label="$t('佣金类型')" prop="commissionType">
...@@ -213,7 +213,6 @@ export default { ...@@ -213,7 +213,6 @@ export default {
this.$set(this.form, 'shadeCommissionAmount', 0) this.$set(this.form, 'shadeCommissionAmount', 0)
} }
// 暗佣需要查询暗佣设置 // 暗佣需要查询暗佣设置
if(val == 2){ if(val == 2){
this.getCommission() this.getCommission()
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<el-descriptions style="margin-top: 20px" :column="4" border> <el-descriptions style="margin-top: 20px" :column="4" border>
<el-descriptions-item :label="$t('集运仓库')">{{ warehouseDetails && warehouseDetails.warehouseOutName ? warehouseDetails.warehouseOutName : '' }}</el-descriptions-item> <el-descriptions-item :label="$t('集运仓库')">{{ warehouseDetails && warehouseDetails.warehouseOutName ? warehouseDetails.warehouseOutName : '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('储位')"> <el-descriptions-item :label="$t('储位')">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}{{$t('')}}</div><div>{{item.warehouseName ? item.regionName :''}} {{$t('区')}}</div> <div>{{item.code}}</div></div> {{ ($refs.area ? $refs.area.selected : []).join(',') }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="type == 2" :label="$t('选择储位')"> <el-descriptions-item v-if="type == 2" :label="$t('选择储位')">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">{{$t('选择储位')}}</div> <div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">{{$t('选择储位')}}</div>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<el-button v-if="type == 1" size="medium" @click="cancellationOfOrder">{{$t('取消调仓')}}</el-button> <el-button v-if="type == 1" size="medium" @click="cancellationOfOrder">{{$t('取消调仓')}}</el-button>
<el-button size="medium" @click="$tab.closeOpenPage({path:'/order/order'})">{{$t('返回')}}</el-button> <el-button size="medium" @click="$tab.closeOpenPage({path:'/order/order'})">{{$t('返回')}}</el-button>
</div> </div>
<warehouse-location ref="area" :city-id="warehouseInShi" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location> <warehouse-location ref="area" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location>
<el-dialog :title="$t('订单转异')" center :visible.sync="escapeBol"> <el-dialog :title="$t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200"> <el-form label-position="top" label-width="200">
<el-form-item :label="$t('原因类型')"> <el-form-item :label="$t('原因类型')">
...@@ -160,7 +160,7 @@ import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index"; ...@@ -160,7 +160,7 @@ import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index";
import {getSupplierPage} from "@/api/ecw/supplier"; import {getSupplierPage} from "@/api/ecw/supplier";
import {getByWarehouseId} from "@/api/ecw/warehouseArea"; import {getByWarehouseId} from "@/api/ecw/warehouseArea";
import {adjustLastWithStatus, warehouseApprovalCancel} from "@/api/ecw/batchSingleApplication"; import {adjustLastWithStatus, warehouseApprovalCancel} from "@/api/ecw/batchSingleApplication";
import warehouseLocation from "@/views/ecw/order/components/warehouseLocation"; import warehouseLocation from "@/components/WarehouseAreaDialog";
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload";
import {getProductBrankPage} from "@/api/ecw/productBrank"; import {getProductBrankPage} from "@/api/ecw/productBrank";
import {parseTime} from "@/utils/ruoyi"; import {parseTime} from "@/utils/ruoyi";
...@@ -280,35 +280,11 @@ export default { ...@@ -280,35 +280,11 @@ export default {
this.warehouseDetails = r.data[r.data.length - 1] this.warehouseDetails = r.data[r.data.length - 1]
listByOrderId({orderId:this.orderId}).then(res => { listByOrderId({orderId:this.orderId}).then(res => {
if(res.code === 0){ if(res.code === 0){
getByWarehouseId().then(r =>{ this.params.orderLocationCreateReqVOList = res.data
let obj = [];
res.data.forEach(item => { // 等待仓库id和已选的储位后初始化储位信息
r.data.forEach(itemm => { this.$nextTick(() => {
if(item.wareId === itemm.id){ this.$refs.area.updateArea()
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children && ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
console.log(obj)
this.storageSpaceList = obj;
}) })
} }
}) })
...@@ -392,37 +368,8 @@ export default { ...@@ -392,37 +368,8 @@ export default {
}, },
}, },
watch:{ watch:{
'params.orderLocationCreateReqVOList'(val){ 'params.orderLocationCreateReqVOList'(vo, vn){
console.log(val,'val'); console.log(vo, vn)
getByWarehouseId().then(r =>{
let obj = [];
val.forEach(item => {
r.data.forEach(itemm => {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList && itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children && ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
this.storageSpaceList = obj;
})
} }
} }
} }
......
...@@ -223,11 +223,16 @@ export default { ...@@ -223,11 +223,16 @@ export default {
mounted() { mounted() {
if(this.$route.query.id){ if(this.$route.query.id){
this.orderId = parseInt(this.$route.query.id || undefined) this.orderId = parseInt(this.$route.query.id || undefined)
this.getOrder()
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse()) getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse())
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data) getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
Promise.all([
this.getOrder(),
listByOrderId({ orderId: this.orderId }).then(r => { listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data this.form.orderLocationCreateReqVOList = r.data
})
]).then(() => {
// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.area.updateArea() this.$refs.area.updateArea()
}) })
...@@ -313,7 +318,7 @@ export default { ...@@ -313,7 +318,7 @@ export default {
this.form.sumWeight = this.order.sumWeight// || sumWeight this.form.sumWeight = this.order.sumWeight// || sumWeight
}, },
getOrder(){ getOrder(){
getOrder(this.orderId).then(r => { return getOrder(this.orderId).then(r => {
this.order = r.data this.order = r.data
this.getTowSum() this.getTowSum()
}) })
......
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }], attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }], titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }], titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }],
materialType: [{ required: true, message: this.$t("商品材质不能为空"), trigger: "blur" }], // materialType: [{ required: true, message: this.$t("商品材质不能为空"), trigger: "blur" }],
// packaging: [{ required: true, message: "包装要求不能为空", trigger: "blur" }], // packaging: [{ required: true, message: "包装要求不能为空", trigger: "blur" }],
// containerLocation: [{ required: true, message: "默认货柜位置不能为空", trigger: "blur" }], // containerLocation: [{ required: true, message: "默认货柜位置不能为空", trigger: "blur" }],
// square: [{ required: true, message: "订单方数上线不能为空", trigger: "blur" }], // square: [{ required: true, message: "订单方数上线不能为空", trigger: "blur" }],
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
- -
<el-input v-model="item.endNum" type="number" placeholder="" class="w-100"></el-input> <el-input v-model="item.endNum" type="number" placeholder="" class="w-100"></el-input>
/ /
<selector v-model="form.weightUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector v-model="item.weightUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认运费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"> <el-form-item :label="$t('默认运费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}">
<inputor default2="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10"/> <inputor default2="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10"/>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
> >
<selector v-model="item.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector v-model="item.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
<inputor default2="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/> <inputor default2="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 ml-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/>
/ <selector v-model="item.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> / <selector v-model="item.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
</div> </div>
...@@ -426,6 +426,7 @@ export default { ...@@ -426,6 +426,7 @@ export default {
stepPrice: 0, stepPrice: 0,
advanceStatus: 0, advanceStatus: 0,
needBook: 0, needBook: 0,
specialList: [],
// dayLimit: 10000, // dayLimit: 10000,
validateEndDate: undefined, validateEndDate: undefined,
validateStartDate: undefined, validateStartDate: undefined,
...@@ -471,9 +472,9 @@ export default { ...@@ -471,9 +472,9 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
if(!this.form.specialList){ /* if(!this.form.specialList || !this.form.specialList.length){
console.log('specialList默认给[]')
this.$set(this.form, 'specialList', []) this.$set(this.form, 'specialList', [])
}
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => { this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
this.form.specialList.push({ this.form.specialList.push({
"clearancePrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null "clearancePrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null
...@@ -485,6 +486,23 @@ export default { ...@@ -485,6 +486,23 @@ export default {
"transportVolumeUnit": null, "transportVolumeUnit": null,
}) })
}) })
} */
console.log(this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS))
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
if(!this.form.specialList.find(special => special.specialDictType == item.value)){
this.form.specialList.push({
"clearancePrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null
"clearancePriceUnit": null,
"clearanceVolumeUnit": null,
"specialDictType": item.value,
"transportPrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null
"transportPriceUnit": null,
"transportVolumeUnit": null,
})
}
})
}, },
methods: { methods: {
priceValidator(rule, value, callback){ priceValidator(rule, value, callback){
...@@ -522,7 +540,7 @@ export default { ...@@ -522,7 +540,7 @@ export default {
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
// lineChannelList: this.selectedRoutes, // lineChannelList: this.selectedRoutes,
specialList: this.specialProducts, // specialList: this.specialProducts,
isAllProduct: 0 isAllProduct: 0
}) })
if(this.form.stepPrice != 1){ if(this.form.stepPrice != 1){
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态')" prop="auditStatus"> <el-form-item :label="$t('上架状态')" prop="auditStatus">
<dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/> <dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="combStatus"> <el-form-item :label="$t('状态')" prop="combStatus">
...@@ -349,7 +349,7 @@ export default { ...@@ -349,7 +349,7 @@ export default {
} }
let setPriceText = notSetPrice ? '(' + this.$t('未设置价格') + ')' : ''; let setPriceText = notSetPrice ? '(' + this.$t('未设置价格') + ')' : '';
if(row.blacklist) return this.$t('黑名单') + setPriceText; if(row.blacklist) return this.$t('黑名单') + setPriceText;
if(row.auditStatus === AuditStatusEnum.PASS) return this.$t('审核') + setPriceText; if(row.auditStatus === AuditStatusEnum.PASS) return this.$t('上架') + setPriceText;
return this.$t('已下架') + setPriceText; return this.$t('已下架') + setPriceText;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment