Commit 01e36148 authored by 我在何方's avatar 我在何方
parents 3611021c 02a6bd11
......@@ -96,8 +96,10 @@ export default {
isAllProduct(isAllProduct){
this.$emit('setall', isAllProduct)
},
defaultIds(){
defaultIds(newValue, oldValue){
if(!oldValue || !oldValue.length){
this.loadDefaultProds()
}
},
isall(isall){
this.isAllProduct = isall
......@@ -119,6 +121,9 @@ export default {
this.isAllProduct = true
}, */
loadDefaultProds(){
if(!this.defaultIds || !this.defaultIds.length){
return false
}
getProductList({ids: this.defaultIds.join(',')}).then(res => {
res.data.forEach(item => {
this.choose(item)
......
......@@ -198,6 +198,7 @@ export const DICT_TYPE = {
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state'
......
......@@ -3,9 +3,12 @@
<el-form ref="costForm" :model="costObj" :rules="rules" label-width="80px">
<el-form-item :label="$t('操作步骤')" prop="opStepType">
<el-select v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-select v-if="flag=='sea'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('费用类型')" prop="costType">
......@@ -67,6 +70,7 @@ export default {
price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }],
priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }]
},
flag: 'sea'
};
},
created() {
......@@ -80,6 +84,9 @@ export default {
getCurrencyList().then((res) => {
this.currencyList = res.data ?? [];
});
if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir';
}
},
methods: {
submit() {
......
......@@ -621,6 +621,7 @@ export default {
}
if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row;
this.currRow.bosType = 'seaAir'
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
......
......@@ -158,6 +158,9 @@ export default {
if (type === "query") {
this.getBillList();
}
if(type === 'close'){
this.$emit("closeDialog");
}
},
handleCommand(type, row) {
switch (type) {
......
......@@ -201,6 +201,7 @@ export default {
this.$emit("closeDialog", type);
},
jumpReviewDetail() {
this.close('close')
const { bpmProcessId } = this.currData;
toReviewDetail.apply(this, [bpmProcessId]);
},
......
......@@ -2,9 +2,12 @@
<div class="shippingSea-dialog">
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item :label="$t('操作步骤')">
<el-select v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<el-select v-if="flag=='sea'" v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
<el-select v-if="flag=='seaAir'" v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('票异常')">
<el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')">
......@@ -63,11 +66,15 @@ export default {
label: this.$t(""),
},
],
flag: 'sea'
};
},
created() {
const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode?.dataKey ?? undefined };
if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir';
}
},
methods: {
/** 提交 */
......
......@@ -6,7 +6,7 @@
<el-descriptions-item :label="$t('运输方式')">
<dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货方式')">
<el-descriptions-item :label="$t('出货渠道')">
{{channel ? channel.nameZh : '/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')">
......
......@@ -84,9 +84,7 @@
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled="inWarehouse">
<template v-for="item in routerList">
<option :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option>
</template>
<option v-for="item in routerList" :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option>
</select>
</div>
</el-card>
......@@ -137,14 +135,9 @@
:disabled="!canAddProduct || !productEditable" />
</template>
</el-table-column>
<!-- <el-table-column label="商品类型" width="160px">
<template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id"></selector>
</template>
</el-table-column> -->
<el-table-column :label="$t('品牌')" width="100px">
<template slot="header" slot-scope="scope">
<template slot="header">
{{$t('品牌')}} <span class="red">*</span>
</template>
<template slot-scope="scope">
......@@ -160,7 +153,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('件数')" width="90px">
<template slot="header" slot-scope="scope">
<template slot="header">
{{$t('件数')}} <span class="red">*</span>
</template>
<template slot-scope="{row}">
......@@ -180,29 +173,29 @@
<el-input v-model="row.quantity" @keyup.native="checkPositiveInterge(row, 'quantity')" :disabled="!canAddProduct || !productEditable" />
</template>
</el-table-column>
<el-table-column :label="$t('总体积') + '(m³)'" width="100px">
<el-table-column :label="$t('总体积') + '(m³)'" width="120px">
<template slot-scope="scope">
<el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.volume`"
:rules="[
{ type: 'number', min: 0, message: $t('体积错误'), trigger: 'blur'}
{ validator: validatorPositiveNumber, message: $t('体积错误'), trigger: 'blur'}
]"
class="mb-0 mr-0"
>
<el-input v-model.number="scope.row.volume" :disabled="!canAddProduct || !productEditable" />
<el-input v-model="scope.row.volume" :disabled="!canAddProduct || !productEditable" />
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('总重量') + '(kg)'" width="100px">
<el-table-column :label="$t('总重量') + '(kg)'" width="120px">
<template slot-scope="scope">
<el-form-item label=""
:prop="`orderItemVOList.${scope.$index}.weight`"
:rules="[
{ type: 'number', min: 0, message: $t('重量错误'), trigger: 'blur'}
{ validator: validatorPositiveNumber, message: $t('重量错误'), trigger: 'blur'}
]"
class="mb-0 mr-0"
>
<el-input v-model.number="scope.row.weight" :disabled="!canAddProduct || !productEditable" />
<el-input v-model="scope.row.weight" :disabled="!canAddProduct || !productEditable" />
</el-form-item>
</template>
</el-table-column>
......@@ -528,13 +521,22 @@ import WorkFlow from '@/components/WorkFlow'
// 缓存默认的表单数据
let defaultFormData = null
window.Decimal = Decimal
export default {
name: "EcwOrderEdit",
components: {
ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer, SupplierSelector, WorkFlow
},
data() {
let validatorPositiveNumber = (rule, value, callback) => {
if (!value) return callback(new Error('请输入数字'))
if (!Number(value)) return callback(new Error('请输入有效数字'))
let reg = /((^[1-9]\d*)|^0)(\.\d*){0,1}$/;
if (!reg.test(value)) return callback(new Error('请输入有效数字'));
callback();
}
return {
validatorPositiveNumber,
customDraweeList: [],
// draweeList: [],
// 遮罩层
......@@ -957,29 +959,9 @@ export default {
},
// 检查正整数
checkPositiveInterge(row, field){
console.log('checkPositiveInterge', field, row[field])
row[field] = row[field].replace(/[^\d]/g, '')
},
/* // 检查正数
checkPositive(row, field){
if(row.field < 0){
row[field] = 0
}
}, */
/* onFileChoosed(e){
window.choosed = e
console.log('onFileChoosed', e)
const reader = new FileReader();
reader.readAsBinaryString(e.target.files[0]);
reader.onload = function(e) {
const data = e.target.result;
const zzexcel = xlsx.read(data, {
type: 'binary'
})
window.zzexcel = zzexcel
window.tableJson = xlsx.utils.sheet_to_json(zzexcel.Sheets[zzexcel.SheetNames[0]])
}
}, */
onProductChange(row, product){
console.log(product)
// 如果是清除商品
......
......@@ -228,8 +228,7 @@
<!-- 特价 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323])
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14])
">
<el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="['ecw:order:update']" >{{$t('特价')}}</el-dropdown-item>
</template>
......
......@@ -95,7 +95,7 @@
<template v-slot="{row}">
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItem=row">{{$t('优惠申请')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showCommissionItem=row">{{$t('佣金规则')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showAllowanceItem=row">{{$t('管理折扣')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:discount']" @click="showAllowanceItem=row">{{$t('管理折扣')}}</el-button>
</template>
</el-table-column>
......
......@@ -396,7 +396,7 @@ export default {
// 获得角色拥有的菜单集合
listRoleMenus(id).then(response => {
// 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
this.form.menuCheckStrictly = true
// this.form.menuCheckStrictly = true
// 设置选中
this.$refs.menu.setCheckedKeys(response.data);
// 设置为非严格,继续使用半选中
......@@ -466,7 +466,7 @@ export default {
if (this.form.id !== undefined) {
assignRoleMenu({
roleId: this.form.id,
menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
menuIds: [...this.$refs.menu.getCheckedKeys()] // , ...this.$refs.menu.getHalfCheckedKeys() 不需要半选中的,会在下次回显的时候导致子节点全部被选中
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.openMenu = false;
......
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