Commit 98039f9c authored by 我在何方's avatar 我在何方
parents 7d6d824b 7f345a0f
......@@ -218,4 +218,13 @@ export function downloadByOrderId(orderId) {
params: {orderId},
responseType: 'arraybuffer'
});
}
// 获得出货审核
export function getBoxApproval(params) {
return request({
url: "/ecw/box-approval/get",
method: "get",
params,
});
}
\ No newline at end of file
......@@ -346,10 +346,12 @@ export function cancelOrderSpecial(orderApprovalId,data) {
}
// 获得订单特价申请详情
export function getOrderSpecial(orderItemId, type = 1) {
export function getOrderSpecial(orderId, type, params) {
console.log(orderId, type, params)
return request({
url: '/ecw/order/special/info/' + orderItemId + '/' + type,
method: 'get'
url: '/ecw/order/special/info/' + orderId + '/' + type,
method: 'get',
params
})
}
......
......@@ -37,7 +37,7 @@ export function createPick(data){
}
//获得控货订单放货编辑详情
export function getRleaseInfo(orderId){
export function getReleaseInfo(orderId){
return request({
url:'/ecw/order-cargo-control/release/info/' + orderId,
method:'get'
......@@ -117,9 +117,9 @@ export function seasoningCondimentsSelect(params){
}
// 根据放货ID查询控货订单放货修改审核详情
export function getPpickUpdateInfo(id){
export function getPickUpdateInfo(id){
return request({
url: '/ecw/order-cargo-control-pick/update/info/{id}/' + id,
url: '/ecw/order-cargo-control-pick/update/info/' + id,
method: 'get'
})
}
......@@ -131,4 +131,11 @@ export function getPickUpdateApproveInfo(params){
method: 'get',
params
})
}
export function getCondimentsIno(cargoControlPickId){
return request({
url: '/ecw/order-cargo-control-pick/seasoning/condiments/info/' + cargoControlPickId,
method: 'get'
})
}
\ No newline at end of file
import request from '@/utils/request'
// 校验手机号
export function validatorMobile(params) {
return request({
url: '/param/validator/mobile',
method: 'post',
params
})
}
......@@ -107,7 +107,7 @@ export default {
return this.valueSync = this.multiple ? [] : this.value
}
if(this.multiple){
let value = []
let value = this.value || []
if(typeof this.value == 'string'){
value = this.value.split(',').filter(item => item && item != '')
}
......
......@@ -120,7 +120,9 @@ export default {
return;
}
// 添加的提交
createCustomer(this.form).then(res => {
let data = {...this.form}
data.type = this.form.type.join(",")
createCustomer(data).then(res => {
this.$modal.msgSuccess("新增成功");
return getCustomerContactsSelect({customerId: res.data})
}).then(res => {
......
......@@ -293,20 +293,20 @@ export const constantRoutes = [
name: 'order-special',
meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'}
},
{
/* {
path: 'discount/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true,
name: 'discount',
meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'}
},
{
}, */
/* {
path: 'discount1/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true,
name: 'discount1',
meta: {title: '订单折扣申请', icon: '', activeMenu: '/order/index'}
},
},
{
path: 'speciallight/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/light'),
......@@ -328,6 +328,7 @@ export const constantRoutes = [
name: 'special-commission',
meta: {title: '修改佣金规则', icon: '', activeMenu: '/order/index'}
},
*/
{
path: 'associated-order/:orderId(\\d+)',
component: (resolve) => require(['@/views/ecw/order/associatedOrder'],resolve),
......
......@@ -107,7 +107,7 @@ service.interceptors.response.use(res => {
Notification.error({
title: msg
})
return Promise.reject('error')
return Promise.reject(msg || 'error')
} else {
return res.data
}
......
......@@ -131,23 +131,25 @@ import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssig
import {getDate} from "@/utils/dateUtils";
import {listSimpleUsers} from "@/api/system/user";
import {getActivityList} from "@/api/bpm/activity";
import SpecialDetail from "@/views/ecw/offer/components/SpecialDetail"
import OfferSpecialDetail from "@/views/ecw/offer/components/SpecialDetail"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail'
import SplitDetail from '@/views/ecw/order/components/SplitDetail'
import MergeDetail from '@/views/ecw/order/components/MergeDetail'
import CargoControlDetail from '@/views/ecw/order/components/CargoControlDetail'
import BoxSplitDetail from '@/views/ecw/order/components/BoxSplitDetail'
// 流程实例的详情页,可用于审批
export default {
name: "ProcessInstanceDetail",
components: {
Parser,
SpecialDetail,
OfferSpecialDetail,
warehouseDetails,
shippingDetail,
SplitDetail,
MergeDetail,
CargoControlDetail
CargoControlDetail,
BoxSplitDetail
},
computed:{
matterNum(){
......@@ -160,18 +162,18 @@ export default {
const map = {
// 报价单特价审核,原来配置的组件名
"special-discount": {
component: 'SpecialDetail',
component: 'OfferSpecialDetail',
id: this.processInstance.businessKey,
type: 1
},
// 报价单特价审核,符合命名规则的组件名
offer_special: {
component: 'SpecialDetail',
component: 'OfferSpecialDetail',
id: this.processInstance.businessKey,
type: 1
},
offer_commission: {
component: 'SpecialDetail',
component: 'OfferSpecialDetail',
id: this.processInstance.businessKey,
type: 2
},
......@@ -259,10 +261,16 @@ export default {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
// 拆单审核
split_detail: {
component: "SplitDetail",
id: this.processInstance.businessKey,
},
// 出货拆单审核
shipment_split_detail: {
component: "BoxSplitDetail",
id: this.processInstance.businessKey,
},
merge_detail: {
component: "MergeDetail",
id: this.processInstance.businessKey,
......@@ -285,7 +293,7 @@ export default {
id: this.processInstance.businessKey,
applyType: 9
},
// 取消放货审核 // TODO 接口待完善,applyType待完善
// 取消放货审核
order_cancel_release: {
component: 'CargoControlDetail',
id: this.processInstance.businessKey,
......
......@@ -61,7 +61,7 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
......@@ -120,8 +120,8 @@ export default {
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
page: 1,
rows: 10,
name: null,
type: null,
},
......
......@@ -124,7 +124,7 @@
<el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item>
<el-dropdown-item command="editLadingBill">编辑提货单</el-dropdown-item>
<el-dropdown-item v-if="scope.row.ldStatus==47" command="editLadingBill">编辑提货单</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown trigger="click">
......
......@@ -224,6 +224,7 @@
<el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item>
<el-dropdown-item command="editLadingBill">编辑提货单</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown trigger="click">
......@@ -289,6 +290,9 @@
:shipmentObj="currRow"
/>
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</template>
</el-dialog>
</div>
</template>
......@@ -306,13 +310,15 @@ import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue'
import regError from './regError.vue'
import editForm from './editSeaAirForm.vue'
import ladingBill from "./ladingBill/index.vue";
export default {
name: 'box',
components: {
costForm,
regError,
editForm
editForm,
ladingBill,
},
data() {
return {
......@@ -487,7 +493,7 @@ export default {
this.getList();
}
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id
......@@ -538,6 +544,15 @@ export default {
this.handleDelete(row)
break
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = `查看提单 ${row.selfNo ?? ""} 柜号:${
row.cubNo ?? ""
} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true);
break;
case 'cost':
this.$set(this.dialogCfg, 'title', '费用登记')
break
......
......@@ -183,7 +183,7 @@ export default {
}).then((res) => {
const { data } = res;
const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {};
let billContent = `${titleZh}${contentZh}`,
let billContent = `${titleZh}${data.orderInfo}${contentZh}`,
orderNo = data.orderInfo?.orderNo ?? "";
this.currData = {
billContent,
......
......@@ -6,7 +6,7 @@
<div class="node-area">
<div v-for="node in nodes" :key="node.title" @click="nodeClick(index, node)" class="node-div">
<div>
<img :src="getImgSrc(node)" alt="">
<img :src="getImgSrc(node)" alt="" :width="width" :height="height">
<p>{{node.title}}</p>
</div>
</div>
......@@ -78,6 +78,14 @@ export default {
props: {
shipmentObj: Object,
seaBaseData: Array,
width: {
type: String,
default: '76px'
},
height: {
type: String,
default: '76px'
}
},
data() {
return {
......
......@@ -26,7 +26,7 @@
</el-card>
<!-- 海运流程图 -->
<seaProcess :seaBaseData="seaAirBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<seaProcess :seaBaseData="seaAirBaseData" :shipmentObj="shipmentObj" width="66px" height="66px" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 -->
<seaStepDetail :seaBaseData="seaAirBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" />
......
......@@ -72,7 +72,7 @@
</el-select>
</el-form-item>
<el-form-item label="密码" prop="pwd">
<el-input v-model="form.pwd" placeholder="请输入密码" type="password"/>
<el-input v-model="pwd1" placeholder="请输入密码" type="password"/>
</el-form-item>
<el-form-item label="确认密码" prop="pwd">
<el-input v-model="pwd2" placeholder="请再次输入密码" type="password"/>
......@@ -121,6 +121,7 @@ export default {
// 表单参数
form: {},
pwd2:null,
pwd1:null,
// 表单校验
rules: {
}
......@@ -191,12 +192,13 @@ export default {
if (!valid) {
return;
}
if(this.pwd2!==this.form.pwd){
if(this.pwd2!==this.pwd1){
this.$modal.alertError("两次密码输入不一致");
return;
}
// 修改的提交
if (this.form.id != null) {
this.form.pwd = this.pwd1;
updateBusiPwd(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<el-dialog
center
title="客服"
:title="$t('客服')"
:visible.sync="show"
width="30%">
<div style="width: 100%;min-height: 200px;text-align: center">
......@@ -10,8 +10,8 @@
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button >取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
<el-button @click="$emit('update:show',false)" >{{$t('取 消')}}</el-button>
<el-button type="primary" @click="submit">{{$t('确 定')}}</el-button>
</span>
</el-dialog>
</template>
......@@ -50,7 +50,7 @@ export default {
methods:{
submit(){
if(!this.service){
return this.$message.warning('请选择客户经理!');
return this.$message.warning(this.$t('请选择客户经理!'));
}
handOverCustomer({
customerServiceId:this.service,
......@@ -59,7 +59,7 @@ export default {
if(r.code === 0){
this.$emit('update:show',false)
this.$emit('update:customerIds',[])
this.$message.success('用户批量转移成功!')
this.$message.success(this.$t('用户批量转移成功!'))
}
})
},
......
......@@ -92,29 +92,22 @@
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
<dict-tag v-if="scope.row.transportId" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
<div v-else>全部</div>
</template>
</el-table-column>
<el-table-column label="始发地/目的地 " align="center" prop="departureId" show-overflow-tooltip :formatter="originDestination">
</el-table-column>
<el-table-column label="报关方式" align="center" prop="customsType" show-overflow-tooltip>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SHIPPING_DECLARATION_TYPE" :value="scope.row.customsType" />
<dict-tag v-if="scope.row.customsType" :type="DICT_TYPE.SHIPPING_DECLARATION_TYPE" :value="scope.row.customsType" />
<div v-else>全部</div>
</template>
</el-table-column>
<el-table-column label="备案" align="center" prop="approval">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMISSION_PRODUCT_APPROVAL" :value="scope.row.approval" />
</template>
</el-table-column>
<el-table-column label="未付佣金" align="center" prop="darkReturnType">
<template slot-scope="scope">
<!-- <dict-tag :type="DICT_TYPE.COMMISSION_DARK_TYPE" :value="scope.row.darkReturnType" />-->
</template>
</el-table-column>
<el-table-column label="已付佣金" align="center" prop="darkReturnType">
<template slot-scope="scope">
<!-- <dict-tag :type="DICT_TYPE.COMMISSION_DARK_TYPE" :value="scope.row.darkReturnType" />-->
<dict-tag v-if="scope.row.approval" :type="DICT_TYPE.COMMISSION_PRODUCT_APPROVAL" :value="scope.row.approval" />
<div v-else>全部</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
......@@ -241,9 +234,10 @@ export default {
}).catch(() => {});
},
originDestination(row){
let index1 = this.exportCityList.findIndex(item =>item.id == row.departureId);
let index2 = this.importCityList.findIndex(item => item.id == row.objectiveId);
let flag = `${index1 === -1 ? '' : this.exportCityList[index1].titleZh}/${index2 === -1 ? '' : this.importCityList[index2].titleZh}`;
let flag = `${index1 === -1 ? '全部' : this.exportCityList[index1].titleZh}/${index2 === -1 ? '全部' : this.importCityList[index2].titleZh}`;
return flag
},
}
......
......@@ -73,7 +73,7 @@
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="warning" size="mini" @click="batchTransferShow = true;" :loading="exportLoading"
<el-button :disabled="selectCustomerList.length === 0" type="primary" size="mini" @click="batchTransferShow = true;" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">批量移交</el-button>
</el-col>
</el-col>
......
......@@ -199,7 +199,7 @@
size="mini"
type="text"
@click="exportReceipt(scope.row.id)"
>导出</el-button
>导出</el-button
>
</template>
</el-table-column>
......
This diff is collapsed.
......@@ -72,7 +72,7 @@
</el-form>
<div v-if="!form.applyStatus">
<div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
......
......@@ -25,19 +25,19 @@
</div>
<div>
原运费:{{form.seaFreight + currencyMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
原运费:{{form.seaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
新运费:{{newSeaFreight + currencyMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
新运费:{{newSeaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
成本价:{{form.orgSeaFreight + currencyMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
成本价:{{form.orgSeaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
明佣:{{ form.lightCommissionAmount + currencyMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
明佣:{{ form.lightCommissionAmount}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
暗佣:{{form.shadeCommissionAmount + currencyMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
暗佣:{{form.shadeCommissionAmount }}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
</el-descriptions-item>
......
......@@ -55,7 +55,7 @@
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
......
......@@ -441,16 +441,16 @@
</el-form-item>
<el-form-item :label="$t('清关证书')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.transportVO.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<dict-selector v-model="form.transportVO.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" />
</el-form-item>
<el-form-item :label="$t('清关证书备注')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-input v-model="form.transportVO.remarks" ></el-input>
</el-form-item>
<el-form-item :label="$t('是否拆包')" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.transportVO.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<dict-selector v-model="form.transportVO.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" />
</el-form-item>
<el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.transportVO.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<dict-selector v-model="form.transportVO.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" />
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span>
</el-form-item>
<br/>
......@@ -751,7 +751,19 @@ export default {
'form.objectiveId'(){
this.getOpenedRouterList()
},
'form.transportId'(){
'form.transportId'(transportId){
// 海空联运默认数据
if(transportId == 4){
this.$set(this.form.transportVO, Object.assign(this.form.transportVO, {
"doubleClear":"1",
"customsClearCert":false,
"isUnpack":false,
"isSingleTicketTransport":false,
"packageTypeArr":[],
"packageType":""
}))
}
this.getOpenedRouterList()
},
'form.channelId'(){
......@@ -799,7 +811,9 @@ export default {
let formData = res.data
formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : []
formData.prodCreateReqVOList = []
if(formData.transportVO && formData.transportVO.packageType){
formData.transportVO.packageTypeArr = formData.transportVO.packageType.split(",").filter(item => item && item != '')
}
if(res.data.offerProdRespVOList){
res.data.offerProdRespVOList.forEach(item => {
formData.prodCreateReqVOList.push({
......
......@@ -83,20 +83,36 @@
<el-col :span="3"><div style="text-align:center">
调至
</div></el-col>
<el-col :span="8"><el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" v-if="item.status !== 1" :value="item.id" :label="item.titleZh"
<el-col :span="8"><el-select clearable v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" v-if="item.status !== 1" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select></el-col>
</el-row>
<el-divider></el-divider>
<h1 class="title">
审批流程
</h1>
<el-divider contentPosition="left">调仓明细</el-divider>
<el-card class="box-card">
<el-table :data="warehouseList">
<el-table-column label="调仓编号" prop="id"></el-table-column>
<el-table-column label="调出仓库" prop="warehouseOutName" ></el-table-column>
<el-table-column label="调入仓库" prop="warehouseInName"></el-table-column>
<el-table-column label="申请人" prop="creatorName"></el-table-column>
<el-table-column label="申请时间">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="状态">
<template v-slot="{row}">
{{STATUS[row.status]}}
</template>
</el-table-column>
</el-table>
</el-card>
<el-divider contentPosition="left">审批流程</el-divider>
<div style="padding: 20px">
<work-flow xmlkey="warehouse_transfer" v-model="params.copyUserId"/>
</div>
<div style="text-align: center" v-if="!adjustmentBol">
<el-button style="margin-right: 50px" @click="submit">提交申请</el-button>
<el-button :disabled="!params.warehouseInId" style="margin-right: 50px" @click="submit">提交申请</el-button>
<el-button @click="$emit('update:dialogVisible',false)">取消</el-button>
</div>
<div style="text-align: center" v-else>
......@@ -120,7 +136,7 @@ import {
} from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import {getOrderPage} from "@/api/ecw/order";
import {getAdjustInfo, getOrderPage} from "@/api/ecw/order";
import workFlow from "@/components/WorkFlow";
import Template from "@/views/cms/template";
import {arrryToKeyedObjectBy} from "@/utils";
......@@ -142,11 +158,16 @@ export default {
},
created() {
getChannelList().then(res => this.channelList = res.data)
},
watch: {
dialogVisible(val) {
if (val) {
this.getOrderListFn()
getAdjustInfo({orderId:this.orderList,lang:0}).then(r => {
this.warehouseList = r.data
})
} else {
this.params = {
orderIds: undefined,
......@@ -175,6 +196,7 @@ export default {
},
data() {
return {
STATUS : {1:'申请中', 2:'通过', 3:'不通过', 4:'已取消', 5:'已出仓',6:'已到仓'},
list: [],
selectedUsers: [],
availableWarehouse: [],
......@@ -188,7 +210,8 @@ export default {
copyUserId: [],
},
applyStatus:{},//调仓-查看状态,
channelList:[]
channelList:[],
warehouseList:[]
}
},
......@@ -213,7 +236,7 @@ export default {
orderWarehouseInAdjustApply(this.params).then(r => {
if (r.code === 0) {
this.$emit('update:dialogVisible', false)
this.$message.success('调仓成功');
this.$message.success('调仓申请提交成功,请耐心等待审核');
}
})
},
......
......@@ -101,7 +101,8 @@
</el-table-column>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
<template v-if="row.cargoControlStatus == 1 && row.isToReview">放货中</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template>
</el-table-column>
......@@ -112,23 +113,25 @@
<el-button type="text" size="mini" @click="showReleaseOrderId=scope.row.orderId">{{$t('放货')}}</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" >{{$t('控货权转移')}}</el-button>
</template>
<!--部分控货-->
<template v-if="scope.row.cargoControlStatus == 2">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('修改')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('取消')}}</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" v-if="scope.row.isToReview">{{$t('放货复核')}}</el-button>
</template>
<!--已完成放货-->
<template v-if="scope.row.cargoControlStatus == 1">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button>
<el-button type="text" size="mini" @click="showTransferCargoOrderId=scope.row.orderId" >{{$t('调货')}}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder=scope.row" v-if="scope.row.isReleaseAfterGoods">{{$t('反复核')}}</el-button>
<!--已全部放货,但是未复核-->
<template v-if="scope.row.cargoControlStatus == 1 && scope.row.isToReview">
<el-button type="text" size="mini" @click="review(scope.row)">{{$t('放货复核')}}</el-button>
</template>
<!-- <el-button type="text" size="mini" >取消</el-button>
<el-button type="text" size="mini" @click="$router.push('cargo_control/detail?id=' + scope.row.orderId)" >查看</el-button> -->
<!--已完成放货,切没有待复核;真正的放货完成-->
<template v-if="scope.row.cargoControlStatus == 1 && !scope.row.isToReview">
<!-- <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button> -->
<el-button type="text" size="mini" @click="cargoTransfer(scope.row)" >{{$t('调货')}}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder=scope.row" v-if="scope.row.isReleaseAfterGoods">{{$t('反复核')}}</el-button>
</template>
</template>
</el-table-column>
......@@ -139,7 +142,7 @@
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" @success="onReleaseSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" @success="onTransferCargoSuccess" />
<transfer-cargo v-if="showTransferCargoOrderId" :order-id="showTransferCargoOrderId" @close="showTransferCargoOrderId=null" @success="onTransferCargoSuccess" :cargoControlPickId="pickInfo ? pickInfo.id : 0" />
<fallback v-if="showFallbackOrder !== null" :order="showFallbackOrder" @close="showFallbackOrder=null" @success="onFallbackSuccess" :index="null" />
</div>
</template>
......@@ -153,7 +156,7 @@ import { getTradeCityList } from '@/api/ecw/region'
import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit'
import { getCargoControlOrderPage, batchReview, orderReview } from "@/api/ecw/orderCargoControl"
import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
......@@ -197,6 +200,7 @@ export default {
showReleaseOrderId: null, // 放货ID
showTransferCargoOrderId: null, // 调货ID
showFallbackOrder: null, // 调货订单
pickInfo: null, // 当前操作的提货信息
};
},
computed: {
......@@ -288,6 +292,15 @@ export default {
this.handleQuery()
})
},
cargoTransfer(row){
getPickRleaseInfo(row.orderId).then(res => {
if(res.data.cargoControlPickBackVOList && res.data.cargoControlPickBackVOList.length > 1){
this.toDetail(row)
}
this.pickInfo = res.data.cargoControlPickBackVOList[0]
this.showTransferCargoOrderId=row.orderId
})
},
onReleaseSuccess(){
this.showReleaseOrderId = null
this.handleQuery()
......
<!--拆单审核中的申请信息部分-->
<template>
<div v-if="detail">
<el-descriptions :column="4" v-if="order">
<el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
<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('出货方式')">
{{channel ? channel.nameZh : '/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')">
<el-tag size="small">
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" /> -->
{{order.statusMsg}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
<el-descriptions-item :label="$t('始发仓')">
{{order.logisticsInfoDto.startTitleZh}}
</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')">
{{order.logisticsInfoDto.destAddressZh}}
</el-descriptions-item>
</el-descriptions>
<template v-for="item in detail.orderSplitBackVOList">
<div class="title mt-20" :key="item.orderNo">
<span class="mr-10">{{item.orderNo}}</span>
<dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<span class="mr-10" v-if="item.channelName">{{item.channelName}}</span>
<span>{{$t('发往')}}{{item.dstWarehouseName}}</span>
</div>
<el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo">
<el-table-column :label="$t('序号')">
<template slot-scope="scope">{{scope.$index+1}}</template>
</el-table-column>
<el-table-column :label="$t('中文品名')">
<template slot-scope="{row}">{{row.prodTitleZh}}</template>
</el-table-column>
<el-table-column :label="$t('英文品名')">
<template slot-scope="{row}">{{row.prodTitleEn}}</template>
</el-table-column>
<el-table-column :label="$t('品牌')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template>
</el-table-column>
<el-table-column :label="$t('体积')">
<template slot-scope="{row}">{{row.volume}}</template>
</el-table-column>
<el-table-column :label="$t('重量')">
<template slot-scope="{row}">{{row.weight}}kg</template>
</el-table-column>
<el-table-column :label="$t('箱数')">
<template slot-scope="{row}">{{row.num}}</template></el-table-column>
</el-table>
</template>
</div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from '@/api/ecw/box'
import {getChannel} from '@/api/ecw/channel'
export default {
props:{
id: [String, Number]
},
data(){
return {
detail: null,
order: null,
channel: null
}
},
watch:{
id(){
this.getData()
},
detail(){
this.getOrder()
},
order(){
if(this.order.channelId){
this.getChannel()
}
}
},
created(){
if(this.id){
this.getData()
}
},
methods:{
getData(){
getBoxApproval({id: this.id}).then(res => {
this.detail = JSON.parse(res.data.details)
})
},
getOrder(){
getOrder(this.detail.orderId).then(res => {
this.order = res.data
})
},
getChannel(){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
}
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
\ No newline at end of file
......@@ -48,7 +48,7 @@
</el-dialog>
</template>
<script>
import {createPick, getRleaseInfo, seasoningCondimentsSelect, updateApply} from '@/api/ecw/orderCargoControl'
import {createPick, getReleaseInfo, seasoningCondimentsSelect, updateApply} from '@/api/ecw/orderCargoControl'
import AreaCodeSelector from '@/components/AreaCodeSelector'
import SendSmsCode from '@/views/ecw/order/components/SendSmsCode'
import WorkFlow from '@/components/WorkFlow'
......@@ -85,7 +85,7 @@ export default {
},
methods:{
loadData(){
getRleaseInfo(this.order.orderId).then(res => this.detail = res.data)
getReleaseInfo(this.order.orderId).then(res => this.detail = res.data)
},
closeDialog(){
this.show = false
......
......@@ -102,10 +102,11 @@
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {createPick, getRleaseInfo} from '@/api/ecw/orderCargoControl'
import {createPick, getReleaseInfo} from '@/api/ecw/orderCargoControl'
import AreaCodeSelector from '@/components/AreaCodeSelector'
import SendSmsCode from '@/views/ecw/order/components/SendSmsCode'
import NeedKnow from '@/components/NeedKnow'
import Decimal from 'decimal.js'
export default {
props:{
orderId: [String, Number]
......@@ -125,6 +126,12 @@ export default {
agreement: false, // 是否同意协议
}
},
watch:{
'formData.pickNum'(pickNum){
this.$set(this.formData, 'pickVolume', Decimal(this.detail.sumVolume).mul(pickNum).div(this.detail.sumNum).toFixed(2))
this.$set(this.formData, 'pickWeight', Decimal(this.detail.sumWeight).mul(pickNum).div(this.detail.sumNum).toFixed(2))
}
},
computed:{
rules(){
return {
......@@ -152,7 +159,7 @@ export default {
},
methods:{
loadData(){
getRleaseInfo(this.orderId).then(res => {
getReleaseInfo(this.orderId).then(res => {
this.detail = res.data
this.$set(this.formData, 'consigneeName', res.data.consigneeName)
this.$set(this.formData, 'consigneeCountryCode', '+' + res.data.consigneeCountryCode)
......@@ -161,8 +168,8 @@ export default {
})
},
closeDialog(){
this.show = false
this.$emit('close');
this.show = false
this.$emit('close')
},
submit(){
this.$refs.form.validate(valid => {
......
......@@ -11,7 +11,7 @@
</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')">
<el-tag size="small">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" />
{{order.statusMsg}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
......
......@@ -10,7 +10,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('收货人电话')">
{{detail.consigneeCountryCode}} {{detail.consigneePhone}}
+{{detail.consigneeCountryCode}} {{detail.consigneePhone}}
</el-form-item>
</el-col>
<el-col :span="24">
......@@ -59,7 +59,7 @@
<el-input v-model="formData.remarks" clearable></el-input>
</el-form-item>
<el-form-item :label="$t('控货手机号')" prop="field117" style="margin-top:20px">
{{detail.consigneeCountryCode}} {{detail.phone}}
+{{detail.consigneeCountryCode}} {{detail.phone}}
</el-form-item>
<el-form-item :label="$t('手机验证码')" prop="code">
<el-input v-model="formData.code" :placeholder="$t('请输入手机验证码')" clearable class="w-150 mr-10"></el-input>
......@@ -76,7 +76,7 @@
</el-dialog>
</template>
<script>
import {createPick, getRleaseInfo, seasoningCondimentsSelect, updateApply} from '@/api/ecw/orderCargoControl'
import {createPick, getReleaseInfo, seasoningCondimentsSelect, updateApply, getCondimentsIno} from '@/api/ecw/orderCargoControl'
import AreaCodeSelector from '@/components/AreaCodeSelector'
import SendSmsCode from '@/views/ecw/order/components/SendSmsCode'
import WorkFlow from '@/components/WorkFlow'
......@@ -115,23 +115,31 @@ export default {
computed:{
releaseVolme(){
return row => {
if(!row.releaseNum) return 0
return new Decimal(row.sumVolume).mul(row.releaseNum).div(row.sumNum).toFixed(2)
}
},
releaseWeight(){
return row => {
if(!row.releaseNum) return 0
return new Decimal(row.sumWeight).mul(row.releaseNum).div(row.sumNum).toFixed(2)
}
}
},
created(){
this.show = true
getCondimentsIno(this.cargoControlPickId).then(res => {
})
this.loadData()
},
methods:{
loadData(){
getRleaseInfo(this.orderId).then(res => this.detail = res.data)
getReleaseInfo(this.orderId).then(res => this.detail = res.data)
seasoningCondimentsSelect({orderId: this.orderId}).then(res => {
res.data.forEach(item => {
item.releaseNum = item.sumNum - item.releaseNum
})
this.orders = res.data
})
},
......
......@@ -6,8 +6,8 @@
<h1>{{orderNo}} 特需</h1>
<el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求">
<el-checkbox-group v-model="advanceType">
<el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :label="item.value" >{{item.label}}</el-checkbox>
<el-checkbox-group v-model="advanceType" >
<el-checkbox @click="change(item)" v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :label="item.value" >{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item>
......@@ -25,7 +25,7 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="submit">提交</el-button>
<el-button type="primary" @click="submit">提交</el-button>
<el-button @click="$emit('update:show',false)">取消</el-button>
</div>
</el-dialog>
......@@ -55,6 +55,7 @@ export default {
advanceType:[],
specialNeedsList:[],
todoDetail:'',
echoList:[],
}
},
methods:{
......@@ -63,7 +64,25 @@ export default {
i.todoDetail = this.todoDetail
})
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{
console.log(p,'p')
let p1 = []
//获取新增的和修改的
p.forEach(item => {
if(this.echoList.find( i => item.id === i.id)){
p1.push(item)
}else {
item.oper = 'add'
p1.push(item)
}
})
//获取删除的
this.echoList.forEach(item => {
if(!(p.find(i => i.id === item.id))){
item.oper = 'del'
p1.push(item)
}
})
specialNeedCreate(p1).then(r=>{
if(r.code === 0){
this.$emit('update:show',false)
this.$emit('determine')
......@@ -86,6 +105,7 @@ export default {
})
//特需回显
getSpecialListByOrderId(this.orderId).then(r => {
this.echoList = r.data;
r.data.forEach(i => {
this.advanceType.push(i.advanceType)
let index = this.specialNeedsList.findIndex(item => i.advanceType == item.advanceType)
......
......@@ -241,8 +241,12 @@ export default {
break;
case 4:
// 入仓修改
getWarehouseUpdateApprovalInfo(this.processInstanceID).then(r => {
this.FeeDetails.details = r.data.details
getWarehouseUpdateApprovalInfo(this.processInstanceID).then(res => {
getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details)
// this.FeeDetails.details = res.data.details
})
})
break
}
......
......@@ -74,10 +74,10 @@
{{order.sumQuantity}}{{$t('个')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收款数据')">
{{order.entryNum}}{{$t('箱')}}
{{order.entryWeight}}Kg
{{order.entryVolume}}m³
{{order.entryQuantity}}{{$t('个')}}
{{order.sumNum}}{{$t('箱')}}
{{order.vweight}}Kg
{{order.wvolume}}m³
{{order.sumQuantity}}{{$t('个')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('入仓类型')">
<dict-tag :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" :value="order.warehouseType" />
......
This diff is collapsed.
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('佣金规则')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('商品类型')">
<span>{{ $l(productType, 'title') }}</span>
</el-form-item>
<el-form-item :label="$t('商品名称')">
<span>{{ orderItem.prodTitleZh }}</span>
</el-form-item>
<el-form-item :label="$t('英文名称')">
<span>{{ orderItem.prodTitleEn }}</span>
</el-form-item>
<el-form-item :label="$t('线路')">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" />
{{ channel ? $l(channel, 'title') : '' }}
{{$t("从【{departureName}】发往【{objectiveName}", {departureName: $l(order.logisticsInfoDto, 'startTitle'), objectiveName: $l(order.logisticsInfoDto, 'destTitle')})}}
</el-form-item>
<el-form-item :label="$t('是否预付')">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="orderItem.isPayAdvance" />
</el-form-item>
<el-row v-if="!orderItem.charging">
<el-col :span="12">
<el-form-item :label="$t('运费')">
{{orderItem.oneSeaFreight}} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('清关费')">
{{orderItem.oneClearanceFreight}} {{ currencyMap[orderItem.clearanceFreightCurrency] }} / {{ unitMap[orderItem.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('全包价')" v-if="orderItem.charging">
{{orderItem.oneSeaFreight}} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
<el-form-item :label="$t('佣金类型')" prop="commissionType">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" />
</el-form-item>
<!-- 明佣或者明佣+暗佣才显示 -->
<el-form-item label="明佣佣金" v-if="form.commissionType == 1 || form.commissionType == 3">
<el-input v-model.number="form.lightCommissionAmount" placeholder="" class="w-100"></el-input>
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
<!-- 明佣+暗佣才显示 -->
<el-form-item label="暗佣佣金" v-if="form.commissionType == 3">
<el-input v-model.number="form.shadeCommissionAmount" placeholder="" class="w-100"></el-input>
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
<!-- 无佣金不显示 -->
<div class="pl-50" v-if="form.commissionType != 0">
<div v-if="form.commissionType != 2">{{$l(orderItem, 'prodTitle')}}</div>
<!-- 明佣+暗佣显示 -->
<div v-if="form.commissionType == 3">
{{$t('成本价')}}{{Decimal(form.freight).minus(form.shadeCommissionAmount)}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</div>
<!-- 暗佣显示 -->
<div v-if="form.commissionType == 2">
{{$l(orderItem, 'prodTitle')}}
<template v-if="darkCommission">
{{$t('暗佣')}}{{darkCommission}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</template>
<el-link type="primary" @click.native="$router.push('/customer/customerCommission?customerId=' + customerId)">{{$t('去设置')}}</el-link>
</div>
<div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{Decimal(form.freight).plus(form.lightCommissionAmount) }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
<div v-if="form.commissionType == 3">{{$t('实际佣金返点')}}{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
</div>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="commission_config" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template>
<script>
import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {getUnitList} from "@/api/ecw/unit"
import {getChannel} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
import Decimal from 'decimal.js'
export default {
name: "OrderSpecialCommission",
props: {
order: Object,
orderItem: Object,
},
components: {
WorkFlow
},
created() {
// 查看详情,列表进来的
this.getOrderSpecial()
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductType(this.orderItem.prodType).then(res => {
this.productType = res.data
})
if(this.order.channelId){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
}
},
data() {
return {
applyType: 3, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
unitList:[],
currencyList:[],
ccIdArr: [],
form: {
type: 3
},
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
},
productType: null,
channel: null,
darkCommission: null
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
},
'form.commissionType'(val, old){
if(typeof old !='undefined' && old != val){
this.$set(this.form, 'lightCommissionAmount', 0)
this.$set(this.form, 'shadeCommissionAmount', 0)
}
// 暗佣需要查询暗佣设置
if(val == 2){
this.getCommission()
}
}
},
methods: {
Decimal(n){
return new Decimal(n)
},
handleSubmit(){
this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
},
getOrderSpecial(){
getOrderSpecial(this.order.orderId, this.applyType, {orderItemId: this.orderItem.orderItemId}).then(r => {
this.form = r.data
})
},
/* getProductTypeNameById(id){
return this.$l(this.productTypeList.find(e => e.id === id), 'title')
}, */
closeDialog(){
this.$emit('close')
},
getCommission(){
getDarkReturnCommission({
customerId: this.order.customerId,
customsType: this.order.customsType,
darkCurrency: this.orderItem.seaFreightCurrency,
darkUnit: this.order.seaFreightVolume,
departureId: this.order.departureVO.departureId,
objectiveId: this.order.objectiveVO.objectiveId,
productAttr: this.orderItem.prodAttrIds.split(',').filter(item => item && item != ''),
productType: this.orderItem.prodType,
transportId: this.order.transportId,
type: 2, // 暗佣
}).then(res => {
this.darkCommission = res.data?.darkCommission
})
}
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
}
}
}
</script>
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('优惠申请')">
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="applyType == 2 ? $t('管理折扣') : $t('优惠申请')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('商品类型')">
<span>{{ $l(productType, 'title') }}</span>
</el-form-item>
<el-form-item :label="$t('商品名称')">
<span>{{ form.prodTitleZh }}</span>
<span>{{ orderItem.prodTitleZh }}</span>
</el-form-item>
<el-form-item :label="$t('英文名称')">
<span>{{ form.prodTitleEn }}</span>
<span>{{ orderItem.prodTitleEn }}</span>
</el-form-item>
<el-form-item :label="$t('线路')">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="form.transportId" />
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" />
{{ channel ? $l(channel, 'title') : '' }}
{{$t("从【{departureName}】发往【{objectiveName}", {departureName: form.departureName, objectiveName: form.objectiveName})}}
{{$t("从【{departureName}】发往【{objectiveName}", {departureName: $l(order.logisticsInfoDto, 'startTitle'), objectiveName: $l(order.logisticsInfoDto, 'destTitle')})}}
</el-form-item>
<el-form-item :label="$t('是否预付')">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="form.isPayAdvance" />
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="orderItem.isPayAdvance" />
</el-form-item>
<el-row v-if="!form.charging">
<el-row v-if="!orderItem.charging">
<el-col :span="12">
<el-form-item :label="$t('旧运费')">
{{form.orgSeaFreight}} {{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
{{form.orgFreight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -31,11 +31,11 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="!form.charging">
<el-row v-if="!orderItem.charging">
<el-col :span="12">
<el-form-item :label="$t('新运费')" style="width: 400px" prop="seaFreight">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -46,18 +46,18 @@
</el-col>
</el-row>
<el-form-item :label="$t('旧全包价')" v-if="form.charging">
{{form.orgSeaFreight}} {{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
<el-form-item :label="$t('旧全包价')" v-if="orderItem.charging">
{{form.freight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="form.charging">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="orderItem.charging">
<el-input v-model="form.freight" type="number" class="w-100" />
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<work-flow xmlkey="special_apply" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
......@@ -73,38 +73,46 @@ import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {getUnitList} from "@/api/ecw/unit"
import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductTypeList, getProductType } from '@/api/ecw/productType'
import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
export default {
name: "specialDiscount",
name: "OrderSpecialDiscount",
props: {
orderItemId: Number,
order: Object,
orderItem: Object,
applyType:{ // // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠, 默认是优惠申请,可以设置为2表示管理折扣,公用一个组件
type: Number,
default: 1
}
},
components: {
WorkFlow
},
created() {
// 查看详情,列表进来的
if(this.orderItemId){
this.getOrderSpecial()
}
this.getOrderSpecial()
getUnitList().then(res => this.unitList = res.data)
// getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
// getProductTypeList().then(res => this.productTypeList = res.data)
getProductType(this.orderItem.prodType).then(res => {
this.productType = res.data
})
if(this.order.channelId){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
}
},
data() {
return {
// applyType: 1, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
unitList:[],
// channelList:[],
currencyList:[],
// productTypeList:[],
ccIdArr: [],
form: {
type: 1
},
form: { },
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
......@@ -121,23 +129,15 @@ export default {
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {type: 1})).then(res => {
createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
},
getOrderSpecial(){
getOrderSpecial(this.orderItemId).then(r => {
getOrderSpecial(this.order.orderId, this.applyType, {orderItemId: this.orderItem.orderItemId}).then(r => {
this.form = r.data
getProductType(this.form.productType).then(res => {
this.productType = res.data
})
if(this.form.channelId){
getChannel(this.form.channelId).then(res => {
this.channel = res.data
})
}
})
},
/* getProductTypeNameById(id){
......
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('管理折扣')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('旧全包价')" v-if="orderItem.charging">
{{form.freight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="orderItem.charging">
<el-input v-model="form.freight" type="number" class="w-100" />
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="special_apply" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template>
<script>
import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {getUnitList} from "@/api/ecw/unit"
import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
export default {
name: "OrderSpecialDiscount",
props: {
order: Object,
orderItem: Object,
applyType: Number // 4是重货优惠5是泡货优惠
},
components: {
WorkFlow
},
created() {
// 查看详情,列表进来的
this.getOrderSpecial()
},
data() {
return {
// applyType: 2, //1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
ccIdArr: [],
form: {
},
rules:{
},
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
},
getOrderSpecial(){
getOrderSpecial(this.order.orderId, this.applyType, {}).then(r => {
this.form = r.data
})
},
closeDialog(){
this.$emit('close')
}
}
}
</script>
This diff is collapsed.
<template>
<div class="app-container">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: bold">{{$t('优惠申请')}}</span>
</div>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="商品类型">
<span>{{ getProductAttrNameById(form.prodType) }}</span>
</el-form-item>
<el-form-item label="商品名称">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item label="英文名称">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}}
</el-form-item>
<el-form-item label="是否预付">
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费" style="width: 400px">
<el-input v-model="form.orgFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费" style="width: 400px">
<el-input v-model="form.orgClearanceFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required style="width: 400px">
<el-input v-model="form.freight" type="number" class="input-with-select">
<div slot="prepend" style="width: 60px">{{ currentMap[form.freightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.freightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required style="width: 400px">
<el-input v-model="form.clearanceFreight" type="number" class="input-with-select">
<div slot="prepend" style="width: 60px">{{ currentMap[form.clearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.clearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
</el-form>
<div>
<h2>审批流程</h2>
<work-flow xmlkey="free_apply" v-model="form.channelId" />
</div>
<div>
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {createOrderSpecial, getOrderSpecial, getOrderSpecialByApproveId} from "@/api/ecw/order"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
import {openedRouterList} from "@/api/ecw/warehouse"
import WorkFlow from "@/components/WorkFlow"
export default {
name: "specialDiscount",
props: {
orderItemId: String,
id: Number,
readonly: {
type: Boolean,
default: false
}
},
components: {
DictSelector,
WorkFlow
},
created() {
// 临时
if(this.$route.query.orderId){
this.form.orderId = this.$route.query.orderId - 0
// this.getOrder()
}
// 查看详情,列表进来的
if(this.orderItemId){
this.form.orderItemId = this.orderItemId - 0
this.getOrderSpecial()
}
// 从流程查看详情
if(this.id)
this.getOrderSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
data() {
return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
form: {
"abnormalState": 0,
"applyResult": "",
"applyStatus": 0,
"applyType": '1',
"ccIds": "",
"channelId": 0,
"charging": 0,
"clearanceFreight": 0,
"clearanceFreightCurrency": 0,
"clearanceFreightVolume": 0,
"commissionCurrencyId": 0,
"commissionType": 0,
"commission_id": 0,
"destAddressEn": "",
"destAddressZh": "",
"destTitleEn": "",
"destTitleZh": "",
"destVolume": "",
"destWarehouseId": 0,
"freight": 0,
"freightCurrency": 0,
"freightVolume": 0,
"inWarehouseState": 0,
"isPayAdvance": 0,
"lightCommissionAmount": 0,
"lineId": 0,
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orgClearanceFreight": 0,
"orgClearanceFreightCurrency": 0,
"orgClearanceFreightVolume": 0,
"orgFreight": 0,
"orgFreightCurrency": 0,
"orgFreightVolume": 0,
"orgVWeight": "",
"orgWVolume": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"shadeCommissionAmount": 0,
"shipmentState": 0,
"startAddressEn": "",
"startAddressZh": "",
"startTitleEn": "",
"startTitleZh": "",
"startVolume": "",
"startWarehouseId": 0,
"status": 0,
"toWarehouseState": 0,
"transportId": 0,
"vweight": "",
"wvolume": ""
},
startTitleZh: '',
destTitleZh: ''
}
},
methods: {
handleSubmit(){
createOrderSpecial({
"applyType": this.isDiscount ? '2' : '1',
clearanceFreight: this.form.clearanceFreight,
clearanceFreightCurrency: this.form.clearanceFreightCurrency,
clearanceFreightVolume: this.form.clearanceFreightVolume,
orderId: this.form.orderId,
orderItemId: this.form.orderItemId,
freight: this.form.freight,
freightCurrency: this.form.freightCurrency,
freightVolume: this.form.freightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功')
this.$tab.closePage()
})
},
getOrderSpecial(){
getOrderSpecial(this.form.orderItemId).then(r => {
this.form = r.data
this.form.freight = ''
this.form.clearanceFreight = ''
})
},
getOrderSpecialByApproveId(){
getOrderSpecialByApproveId(this.id).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
}
},
computed: {
// 折扣管理页面
isDiscount(){
return this.$route.query.discount
},
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
},
watch: {
'form.lineId'(val){
if (val){
openedRouterList({lineId: val}).then(r => {
if(r.data && r.data.length > 0){
this.startTitleZh = r.data[0].startTitleZh
this.destTitleZh = r.data[0].destTitleZh
}
})
}
}
}
}
</script>
<style scoped lang="scss">
</style>
......@@ -30,7 +30,7 @@
prop="address"
:label="$t('入库货物属性')">
<template v-slot="{row}">
<!-- // TODO 待测试完善 -->
<!-- // TODO 缺少入库品牌信息 -->
<template v-if="row.warehouseInInfoVO">
{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /><br>
{{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
......@@ -49,7 +49,7 @@
<el-table-column
:label="$t('原价')">
<template v-slot="{row}">
<template v-if="!row.originalSeaFreight">未报价</template>
<template v-if="!row.originalSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging ==1">
{{$t('全包价')}}{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template>
......@@ -63,7 +63,7 @@
<el-table-column
label="成本价">
<template v-slot="{row}">
<template v-if="!row.costSeaFreight">未报价</template>
<template v-if="!row.costSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging">
{{$t('全包价')}}{{ row.costSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template>
......@@ -77,7 +77,7 @@
<el-table-column
:label="$t('销售价')">
<template v-slot="{row}">
<template v-if="!row.oneSeaFreight">未报价</template>
<template v-if="!row.oneSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging">
{{$t('全包价')}}{{ row.oneSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template>
......@@ -93,24 +93,33 @@
prop="address"
:label="$t('操作')">
<template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItemId=row.orderItemId">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/specialCommission/${row.orderItemId}`)">佣金规则</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount1/${row.orderItemId}?orderId=${row.orderId}&discount=1`)">管理折扣</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItem=row">{{$t('优惠申请')}}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showCommissionItem=row">{{$t('佣金规则')}}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showAllowanceItem=row">{{$t('管理折扣')}}</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 80px">
<el-button type="primary" @click="toweight" v-if="hasWarehouseInInfo && (order.transportId === 1 || order.transportId === 2)">申请重货优惠</el-button>
<el-button type="primary" @click="tolight" v-if="hasWarehouseInInfo && (order.transportId === 3 || order.transportId === 4)">申请泡货优惠</el-button>
<el-button type="primary" @click="$tab.closePage()">关闭窗口</el-button>
<div class="mt-50 flex-center">
<!--
1.海运整柜、海运拼柜显示重货优惠 1,2
2.空运专线、海空联运显示泡货优惠 3,4
-->
<el-button type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button>
<el-button type="primary" @click="showPreferentialType=5" v-else>{{$t('申请泡货优惠')}}</el-button>
<el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button>
</div>
</el-card>
<special-discount v-if="!!showDiscountItemId" :orderItemId="showDiscountItemId" />
<!-- 优惠申请 -->
<discount v-if="!!showDiscountItem" :order="order" :orderItem="showDiscountItem" @close="showDiscountItem=null" @success="onDiscountSuccess" />
<!-- 管理折扣 -->
<discount v-if="!!showAllowanceItem" :order="order" :orderItem="showAllowanceItem" @close="showAllowanceItem=null" :applyType="2" @success="onDiscountSuccess" />
<!-- 佣金规则 -->
<commission v-if="!!showCommissionItem" :order="order" :orderItem="showCommissionItem" @close="showCommissionItem=null" @success="onCommissionSuccess" />
<!-- 重泡货优惠 -->
<preferential v-if="!!showPreferentialType" :applyType="showPreferentialType" :order="order" @close="showPreferentialType=null" @success="onPreferentialSuccess" />
</div>
</template>
......@@ -122,11 +131,13 @@ import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi'
import {getOrder} from "@/api/ecw/order"
import SpecialDiscount from '@/views/ecw/order/components/SpecialDiscount.vue'
import Discount from './Discount'
import Commission from './Commission'
import Preferential from './Preferential'
export default {
name: "OrderSpecial",
components: {
SpecialDiscount
Discount, Commission, Preferential
},
props: {
orderId: [String, Number]
......@@ -139,15 +150,14 @@ export default {
// 遮罩层
loading: true,
list: [],
total:0,
/* total:0,
params:{
page:1,
rows:20,
orderId:0,
type:2
},
}, */
relationId:0,
creatorName:'test',
order: {
number: '',
orderItemVOList: []
......@@ -157,14 +167,14 @@ export default {
productAttrList:[],
hasWarehouseInInfo: false,
showDiscountItemId: null
showDiscountItem: null, // 优惠申请
showCommissionItem: null, // 佣金规则
showAllowanceItem: null, // 管理折扣
showPreferentialType: null, // 重泡货类型
};
},
created() {
if(this.orderId){
this.params.orderId = this.orderId
this.getOrder()
}
this.getOrder()
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
......@@ -192,17 +202,18 @@ export default {
path:"/order/specialLight/"+this.params.orderId,
})
},
/* getProductNamesByIds(ids){
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id) {
result.push(f.attrName)
}
})
})
return result.join(',')
} */
onDiscountSuccess(){
this.showDiscountItem = null
this.getOrder()
},
onCommissionSuccess(){
this.showCommissionItem = null
this.getOrder()
},
onPreferentialSuccess(){
this.showPreferentialType = null
this.getOrder()
}
},
computed: {
currencyMap(){
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">{{$t('申请泡货优惠')}}-{{queryParams.orderNo||''}}</div>
<el-form :model="queryParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row >
<el-form-item :label="$t('原泡货标准:')" label-width="150px">
<span>{{queryParams.orgVWeight}}kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8" >
<el-form-item :label="$t('现泡货申请标准:')" size="medium" label-width="150px" required>
<el-input style="width: 100px;" type="text" v-model="queryParams.vweight" />
<span style="margin-left: 10px;">kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item :label="$t('备注:')" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.remarks" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button v-if="queryParams.applyStatus==0" type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button v-if="queryParams.applyStatus==0" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+queryParams.formId)">{{$t('审核中')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('申请泡货优惠正在审核中,你确定取消申请泡货优惠吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial,cancelOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialLight",
components: {
WorkFlow
},
props: {
orderId: [String, Number]
},
data() {
return {
reason:'',
dialogVisible:false,
loading:false,
queryParams:{
orderId:7,
lang:0
},
selectedUsers:[],
orderData:{},
};
},
created() {
if (this.orderId) {
this.queryParams.orderId = this.orderId
this.getOrderSpecialData()
}
// this.getList()
},
computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
}
},
methods: {
getOrderSpecialData(){
getOrderSpecial(this.queryParams.orderId,5).then(r => {
this.queryParams = r.data
})
},
submitForm(){
this.queryParams.applyType = 5
this.queryParams.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.queryParams).then(r => {
this.$message.success(r.msg || this.$t('提交成功'))
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error(this.$t("请输入取消原因"));
return
}
cancelOrderSpecial(that.queryParams.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success(this.$t("取消成功"));
that.$store.dispatch('tagsView/delCurrentView')
})
},
}
}
</script>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">{{$t('申请重货优惠')}}-{{queryParams.orderNo||''}}</div>
<el-form :model="queryParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row >
<el-form-item :label="$t('原重货标准:')" label-width="150px">
<span>{{queryParams.orgWVolume}}kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8" >
<el-form-item :label="$t('现重货申请标准:')" size="medium" label-width="150px" required>
<el-input style="width: 100px;" type="text" v-model="queryParams.wvolume" />
<span style="margin-left: 10px;">kg/cbm</span>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item :label="$t('备注:')" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.remarks" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="queryParams.applyStatus==0" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" v-if="queryParams.applyStatus==0" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+queryParams.formId)">{{$t('审核中')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('申请重货优惠正在审核中,你确定取消申请重货优惠吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial,cancelOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialWeight",
components: {
WorkFlow
},
props: {
orderId: [String, Number]
},
data() {
return {
reason:'',
dialogVisible:false,
loading:false,
queryParams:{
orderId:7,
lang:0
},
selectedUsers:[],
orderData:{}
};
},
created() {
if (this.orderId) {
this.queryParams.orderId = this.orderId
this.getOrderSpecialData()
}
// this.getList()
},
computed:{
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
getDictDatas(){
return getDictDatas
}
},
methods: {
/** 查询列表 */
getOrderSpecialData(){
getOrderSpecial(this.queryParams.orderId,'4').then(r => {
this.queryParams = r.data
})
},
submitForm(){
this.queryParams.applyType = 4
this.queryParams.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.queryParams).then(r => {
this.$message.success(r.msg || this.$t('提交成功'))
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error(this.$t("请输入取消原因"));
return
}
cancelOrderSpecial(that.queryParams.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success(this.$t("取消成功"));
that.$store.dispatch('tagsView/delCurrentView')
})
},
}
}
</script>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
......@@ -120,13 +120,8 @@
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="order.status !== 5">
<el-button @click="escapeBol = true;" type="primary">转异</el-button>
<el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div>
<template v-if="order.status === 5">
<h2>标枪箱号</h2>
<template v-if="order.parentOrderId && isEdit">
<h2>标签箱号</h2>
<div v-for="(item, index) in label.orderLabelDtoList" :key="index" style="margin-bottom: 10px">
<el-input-number v-model="item.start" controls-position="right"></el-input-number> -
......@@ -138,6 +133,10 @@
<el-button type="primary" @click="handleLabelSubmit">修改箱号</el-button>
</div>
</template>
<div style="text-align: center;margin-top: 15px" v-if="order.status !== 5">
<el-button @click="escapeBol = true;" type="primary">转异</el-button>
<el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div>
</el-form>
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
......@@ -281,7 +280,7 @@ export default {
orderId: this.orderId
}).then(r => {
if (r.code === 0){
this.$message.success(r.msg || '修改标签箱号成功')
}
})
},
......
......@@ -2,7 +2,7 @@
<el-form ref="form" :model="form" label-width="80px">
<el-card class="box-card" style="margin-bottom: 15px">
<div slot="header" class="clearfix">
<el-button style="float: right; padding: 3px 0" type="text" @click="$emit('delete')">删除</el-button>
<el-button v-show="isShowDelete" style="float: right; padding: 3px 0" type="text" @click="$emit('delete')">删除</el-button>
</div>
<el-form-item :label="'商标' + (index + 1)">
<el-input v-model="form.brandName" placeholder="商标"></el-input>
......@@ -37,6 +37,10 @@
export default {
name: "BrandForm",
props: {
isShowDelete: {
type: Boolean,
default: true
},
productTypeList: {
type: Array,
default: []
......
......@@ -110,6 +110,7 @@
<h3>包含商标列表</h3>
<brand-form
:is-show-delete="form.trademarkList.length > 1"
v-for="(item, index) in form.trademarkList"
v-model="form.trademarkList[index]"
:index="index"
......@@ -119,9 +120,9 @@
@delete="form.trademarkList.splice(index, 1)"></brand-form>
<el-button type="primary" @click="form.trademarkList.push({
brandName: '',
brandName: form.titleZh,
productBrandId: form.id,
trademarkCategoryRelList: []
trademarkCategoryRelList: [{productCategoryId:0, productId:0}]
})">添加商标</el-button>
<div slot="footer" style="text-align: center">
......@@ -287,21 +288,26 @@ export default {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateProductBrank(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
if (this.form.trademarkList?.length > 0){
// 修改的提交
if (this.form.id != null) {
updateProductBrank(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createProductBrank(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
return;
} else {
this.$modal.alert('请至少添加一个商标')
}
// 添加的提交
createProductBrank(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
......
......@@ -63,12 +63,12 @@
<div slot="header" style="font-size:20px;">
{{$t('价格设置')}}
<span>
<el-checkbox label="" @change="form.advanceStatus=$event ? 1 : 0">{{$t('预付')}}</el-checkbox>
<el-checkbox label="" @change="form.needPay=$event ? 1 : 0">{{$t('预付')}}</el-checkbox>
<el-checkbox label="" @change="form.stepPrice=$event ? 1 : 0">{{$t('阶梯订单')}}</el-checkbox>
</span>
</div>
<el-form-item :label="$t('单价模式')" prop="priceType">
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" defaultable />
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" formatter="number" defaultable />
</el-form-item>
<!--阶梯订单-->
<template v-if="form.stepPrice==1" >
......@@ -474,6 +474,10 @@ export default {
// 添加的提交
data.productId = this.product.id;
data.lineChannelList = this.selectedRoutes
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error('运费/全包价不能为0')
}
createProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("请求成功"));
this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString())
......
......@@ -51,8 +51,11 @@
<el-form-item :label="$t('审核状态')" prop="auditStatus">
<dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/>
</el-form-item>
<el-form-item :label="$t('状态')" prop="status">
// TODO
<el-form-item :label="$t('状态')" prop="combStatus">
<el-select v-model="queryParams.combStatus" placeholder="请选择状态" clearable>
<el-option label="未设置价格" value="setPrice_1"></el-option>
<el-option label="黑名单" value="blacklist_1"></el-option>
</el-select>
</el-form-item>
......@@ -566,6 +569,12 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.queryParams.setPrice = undefined
this.queryParams.blacklist = undefined
if(this.queryParams.combStatus){
let tmp = this.queryParams.combStatus.split('_')
this.queryParams[tmp[0]] = tmp[1]
}
this.getList();
},
/** 重置按钮操作 */
......
......@@ -48,7 +48,7 @@
<div>
<el-form-item :label="$t('供应商类别')" prop="companyType">
<dict-selector v-model="formData.companyType" type="company_type" multiple />
<dict-selector v-model="formData.companyTypeArr" type="company_type" multiple />
</el-form-item>
<el-form-item :label="$t('合作类型')" prop="cooperationType">
<dict-selector v-model="formData.cooperationType" type="cooperation_type" />
......@@ -93,7 +93,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`contactList.${scope.$index}.name`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('联系人名称不能为空'), trigger: 'blur'}"
>
<el-input v-model="scope.row.name"></el-input>
</el-form-item>
......@@ -104,7 +104,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`contactList.${scope.$index}.phone`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('联系人电话不能为空'), trigger: 'blur'}"
>
<el-input v-model="scope.row.phone"></el-input>
</el-form-item>
......@@ -132,7 +132,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`bankList.${scope.$index}.accountName`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('银行账户名称不能为空'), trigger: 'blur'}"
>
<el-input v-model="scope.row.accountName" placeholder=""></el-input>
</el-form-item>
......@@ -143,7 +143,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`bankList.${scope.$index}.currency`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('币别不能为空'), trigger: 'blur'}"
>
<selector :options="currencyList" v-model="scope.row.currency" value-field="id" :label-field="'title' + $l()"></selector>
</el-form-item>
......@@ -154,7 +154,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`bankList.${scope.$index}.bankName`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('银行名称不能为空'), trigger: 'blur'}"
>
<el-input v-model="scope.row.bankName"></el-input>
</el-form-item>
......@@ -165,7 +165,7 @@
<el-form-item
class="mb-0 mr-0"
:prop="`bankList.${scope.$index}.bankAccount`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}"
:rules="{required: true, message: $t('银行账户不能为空'), trigger: 'blur'}"
>
<el-input v-model="scope.row.bankAccount"></el-input>
</el-form-item>
......@@ -226,7 +226,7 @@ export default {
address: "",
remark: undefined,
field110: undefined,
companyType: [],
companyTypeArr: [],
cooperationType: undefined,
license: null,
contract: null,
......@@ -280,6 +280,9 @@ export default {
this.cityList = item.children || []
}
})
},
'formData.companyTypeArr'(val){
this.$set(this.formData, 'companyType', val.join(","))
}
},
created() {
......@@ -338,9 +341,9 @@ export default {
this.$set(this.formData, type, val)
},
submitForm() {
this.$refs["elForm"].validate(valid => {
this.$refs["elForm"].validate((valid, errors) => {
if (!valid) {
return;
return this.$showFormValidateErrors(errors)
}
let data = Object.assign({}, this.formData)
......
This diff is collapsed.
This diff is collapsed.
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