Commit 83b088c1 authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents 84c870a3 e918ec48
......@@ -9,6 +9,13 @@
}
},
"exclude": [
"node_modules"
]
"node_modules",
"dist",
"bin",
"public",
"src/i18n/"
],
"vueCompilerOptions":{
"target": 2
}
}
\ No newline at end of file
......@@ -76,7 +76,8 @@
"vuedraggable": "2.24.3",
"vuex": "3.6.0",
"xlsx": "^0.18.5",
"xml-js": "^1.6.11"
"xml-js": "^1.6.11",
"@vue/runtime-dom": "latest"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",
......
......@@ -50,7 +50,7 @@ export default {
padding: 50px;
text-align: center;
}
$sizes: 0, 10,20,30,50,100,150,200,500,800,1000;
$sizes: 0, 10,20,30,50,100,150,200,300,500,800,1000;
@for $i from 1 through length($sizes){
$item: nth($sizes, $i);
.ml-#{$item}{
......
......@@ -236,3 +236,19 @@ export function infoListReceiptPage(params){
})
}
// 获取用户
export function getMember(id){
return request({
url: "/member/user/get",
params: {id}
})
}
// 获得客户路线
export function getCustomerLines(customerId){
return request({
url: '/ecw/customer-line/get-by-customer',
params: {customerId}
})
}
......@@ -35,10 +35,11 @@ export function getProduct(id) {
}
// 获得产品列表
export function getProductList() {
export function getProductList(params) {
return request({
url: '/ecw/product/list',
method: 'get'
method: 'get',
params
})
}
......
......@@ -14,7 +14,7 @@
</div>
<div class="line">
<div class="label">电话:</div>
<div class="value">{{item.areaCode}} {{item.phoneNew}}</div>
<div class="value">+{{item.areaCode}} {{item.phoneNew}}</div>
</div>
<div class="line">
<div class="label">邮箱:</div>
......
......@@ -48,6 +48,7 @@ export default {
list:[],
queryParams:{
page: 1,
pageSize: 500,
searchKey: null,
// level: null
},
......@@ -86,7 +87,7 @@ export default {
}
getCustomerContactsSelect({ids: this.value.join(',')})
.then(res => {
this.$set(this, 'choosedList', res.data)
this.$set(this, 'choosedList', res.data.list)
})
},
reLoad(){
......@@ -96,7 +97,7 @@ export default {
},
getList(){
getCustomerContactsSelect(this.queryParams).then(res => {
this.list = res.data
this.list = res.data.list
})
},
choose(item){
......
<template>
<el-table
border
:data="tableData"
:data="exportWarehouseList"
style="">
<el-table-column
width="250px"
label="始发地">
<template v-slot="{ row, column, $index }">
<el-checkbox v-model="row.checked" @change="updateValue(true)">{{ warehouseList[$index].titleZh }}</el-checkbox>
<el-checkbox v-model="row.checked" @change="emit">{{ $l(row, 'title') }}</el-checkbox>
</template>
</el-table-column>
<el-table-column
prop="objectiveId"
label="目的地">
<template v-slot="{ row, column, $index }">
<el-select v-model="tableData[$index].objectiveIds" multiple placeholder="请选择" style="width:100%" @change="updateValue(row.checked)">
<el-select v-model="row.objectiveIdArr" multiple placeholder="请选择" style="width:100%" @change="emit">
<el-option
v-for="item in importCityList"
v-for="item in importWarehouseList"
:key="item.id"
:label="item.titleZh"
:label="$l(item, 'title')"
:value="item.id">
</el-option>
</el-select>
......@@ -41,64 +41,52 @@ export default {
},
data() {
return {
tableData: []
tableData: [],
importWarehouseList: [],
exportWarehouseList: []
}
},
mounted() {
this.freshTableData()
this.initLines()
},
methods: {
/**
* 解析 value
*/
freshTableData(){
const foo = []
let index = 0
this.warehouseList.forEach(e => {
let bar = this.tableData.length > 0 ? this.tableData[index] : {
departureId: e.id,
objectiveIds: [],
tradeType:e.tradeType,
checked: false
}
const valueIndex = this.value.findIndex(v => v.departureId === e.id)
if(valueIndex !== -1) {
bar = { ...this.value[valueIndex], checked: true }
if(bar.objectiveIds.length === 0) {
bar.objectiveIds = []
} else {
bar.objectiveIds = bar.objectiveIds.split(',').map(m => parseInt(m))
initLines(){
this.warehouseList.forEach(item => {
if(item.tradeType == 2 || item.tradeType == 3){
let oldItem = this.value.find(it => it.departureId == item.id)
this.exportWarehouseList.push(Object.assign({}, item, {
checked: !!oldItem,
objectiveIdArr: oldItem ? oldItem.objectiveIds.split(',').map(item => +item) : []
}))
}
if(item.tradeType == 1 || item.tradeType == 3){
this.importWarehouseList.push(Object.assign({}, item))
}
foo.push(bar)
index++
})
this.tableData = foo.filter(i => i.tradeType === '2');
},
/**
* 更新 value
*/
updateValue(really = true){
if (!really) return
const result = []
this.tableData.forEach(e => {
if(e.checked){
const { departureId } = e
let objectiveIds = e.objectiveIds.join(',')
result.push({ departureId, objectiveIds, zhongPaoType: this.zhongPaoType })
getValue(){
let arr = []
this.exportWarehouseList.forEach(item => {
if(item.checked){
arr.push({
objectiveIds: item.objectiveIdArr.join(','),
departureId: item.id,
zhongPaoType: this.zhongPaoType
})
}
})
this.$emit('input', result)
return arr
},
emit(){
this.$emit('input', this.getValue())
}
},
watch: {
value() {
this.freshTableData()
// this.freshTableData()
},
warehouseList() {
this.freshTableData()
this.initLines()
}
}
}
......
......@@ -46,6 +46,7 @@ export default {
list:[],
queryParams:{
page: 1,
pageSize: 500,
name: null,
level: null
},
......@@ -101,7 +102,7 @@ export default {
},
getList(){
getCustomerSelect(this.queryParams).then(res => {
this.list = res.data
this.list = res.data.list
})
},
choose(customer){
......
<template>
<div class="component-upload-image">
<ul class="el-upload-list el-upload-list--picture-card">
<li tabindex="0" class="el-upload-list__item is-success" v-for="(item, index) in fileList" :key="index">
<video v-if="item.url.substr(-4) == '.mp4'" :src="item.url"></video>
<img v-else :src="item.url" :alt="item.name" class="el-upload-list__item-thumbnail">
<!-- <a class="el-upload-list__item-name">
<i class="el-icon-document"></i>
</a> -->
<label class="el-upload-list__item-status-label">
<i class="el-icon-upload-success el-icon-check"></i>
</label>
<!-- <i class="el-icon-close"></i>
<i class="el-icon-close-tip">按 delete 键可删除</i> -->
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(item)">
<i class="el-icon-zoom-in"></i>
</span>
<span class="el-upload-list__item-delete" @click="handleRemove(item)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</ul>
<el-upload
multiple
:action="uploadImgUrl"
......@@ -11,7 +34,7 @@
:on-exceed="handleExceed"
name="file"
:on-remove="handleRemove"
:show-file-list="true"
:show-file-list="false"
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
......@@ -34,10 +57,14 @@
width="800"
append-to-body
>
<template v-if="dialogImageUrl">
<video v-if="dialogImageUrl.substr(-4) == '.mp4'" :src="dialogImageUrl" controls autoplay style="display: block; max-width: 100%; margin: 0 auto"></video>
<img
v-else
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
</template>
</el-dialog>
</div>
</template>
......@@ -49,7 +76,7 @@ export default {
props: {
value: [String, Object, Array],
// 图片数量限制
limit: {
limit2: {
type: Number,
default: 5,
},
......@@ -61,7 +88,7 @@ export default {
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["png", "jpg", "jpeg"],
default: () => ["png", "jpg", "jpeg", 'mp4'],
},
// 是否显示提示
isShowTip: {
......@@ -81,7 +108,8 @@ export default {
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: []
fileList: [],
limit: 5
};
},
watch: {
......@@ -209,5 +237,10 @@ export default {
opacity: 0;
transform: translateY(0);
}
.component-upload-image{
display: flex;
flex-wrap: wrap;
}
</style>
<template>
<el-select
v-model="index"
filterable
clearable
remote
reserve-keyword
:placeholder="$t('请输入关键词')"
:remote-method="remoteMethod"
:loading="loading"
:size="size">
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="`${item.nickname}(${item.mobile})`"
:value="index">
</el-option>
</el-select>
</template>
<script>
import {userMemberUserList, getMember} from '@/api/ecw/customer'
export default {
props:{
productType: [String, Number],
value: [String, Number],
size: String
},
data(){
return {
index: null,
list:[],
loading: false
}
},
watch:{
index(val){
this.$emit('input', (val!==''&&val !== null) ? this.list[val].id: null)
this.$emit('change', (val!==''&&val !== null) ? this.list[val]: null)
},
value(val){
this.init()
}
},
created(){
this.init()
},
methods:{
init(){
if(!this.value) return
let index = this.list.findIndex(item => item.id == this.value)
if(index < 0){
getMember(this.value).then(res => {
if(!res.data) rurn
this.list.unshift(res.data)
this.index = 0
})
}
},
remoteMethod(keyword){
let params = {
pageSize: 100
}
params.searchKey = keyword
this.loading = true
userMemberUserList(params)
.then(res => this.list = res.data.list)
.finally(() => this.loading = false)
}
}
}
</script>
......@@ -40,20 +40,19 @@ export default {
}
},
watch:{
index(val){
index(val, oldVal){
let productId = val !== '' && val !== null ? this.list[val].id : null
console.log('index val', val, productId)
// console.log('index val', val, oldVal, productId)
this.$emit('input', productId)
this.$emit('change', val !== '' && val !== null ? this.list[val] : null)
// 0 != '' 是 false
},
value(val){
console.log('初始化内容', val)
// console.log('初始化内容', val)
this.init()
}
},
created(){
console.log('created', this.value)
// console.log('created', this.value, this.lang)
this.init()
},
methods:{
......
......@@ -41,7 +41,7 @@
</div>
</template>
<script>
import { getProductPage } from '@/api/ecw/product'
import { getProductPage, getProductList } from '@/api/ecw/product'
import { getProductTypeList } from '@/api/ecw/productType'
import { getProductAttrList } from '@/api/ecw/productAttr'
......@@ -53,7 +53,8 @@ export default {
return []
}
},
showAll: Boolean
showAll: Boolean,
isall: Boolean
},
data() {
return {
......@@ -94,6 +95,14 @@ export default {
},
isAllProduct(isAllProduct){
this.$emit('setall', isAllProduct)
},
defaultIds(newValue, oldValue){
if(!oldValue || !oldValue.length){
this.loadDefaultProds()
}
},
isall(isall){
this.isAllProduct = isall
}
},
created() {
......@@ -101,11 +110,26 @@ export default {
getProductAttrList().then(res => this.attrList = res.data)
this.reLoad()
this.ids = this.defaultIds //数据回显
this.isAllProduct = this.isall
// 如果有默认商品则获取内容供回显
if(this.defaultIds.length){
this.loadDefaultProds()
}
},
methods: {
/* setAllProduct(status){
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)
})
})
},
toggleAll(status){
this.list.forEach(item => {
this.toggleCheck(item, status)
......@@ -129,8 +153,8 @@ export default {
this.page = res.data.page
this.pages = res.data.pages
this.total = res.data.total
this.choosedList = [] //搜搜重置,数据回显
if (this.defaultIds.length > 0) {
// this.choosedList = [] //搜搜重置,数据回显
/* if (this.defaultIds.length > 0) {
this.defaultIds.map(item => {
this.list.map(items => {
if (items.id == item) {
......@@ -138,7 +162,7 @@ export default {
}
})
})
}
} */
})
},
toggleCheck(item, checked) {
......
......@@ -90,7 +90,7 @@ export default {
setInterval(() => {
this.$store.dispatch('getNotMessage');
this.$store.dispatch('getToDoList');
}, 3000)
}, 10000)
},
components: {
Breadcrumb,
......
......@@ -180,6 +180,7 @@ export const DICT_TYPE = {
NEED_KNOW_STATUS:'need_know_status',//需知状态
MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
......@@ -198,6 +199,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">
......@@ -26,7 +29,7 @@
</el-form-item>
<el-form-item label="" label-width="0px" prop="priceUnit">
<el-select v-model="costObj.priceUnit" :placeholder="$t('请选择单位')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
<el-option v-for="type in this.currencyList" :key="type.id" :label="$l(type, 'title')" :value="type.id"></el-option>
</el-select>
</el-form-item>
</el-row>
......@@ -47,6 +50,7 @@
import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils";
import { getCurrencyList } from "@/api/ecw/currency";
export default {
name: "costForm",
......@@ -57,6 +61,7 @@ export default {
costObj: {},
// 供应商
allSupplier: [],
currencyList: [],
rules: {
opStepType: [{ required: true, message: this.$t("操作步骤不能为空"), trigger: "change" }],
......@@ -65,6 +70,7 @@ export default {
price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }],
priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }]
},
flag: 'sea'
};
},
created() {
......@@ -75,6 +81,12 @@ export default {
});
const { costDetail } = this.$attrs;
this.costObj = { ...costDetail };
getCurrencyList().then((res) => {
this.currencyList = res.data ?? [];
});
if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir';
}
},
methods: {
submit() {
......
......@@ -214,7 +214,7 @@ import editForm from "./editForm.vue";
import ladingBill from "./ladingBill/index.vue";
export default {
name: "indexSea",
name: "EcwBoxIndexsea",
components: {
costForm,
regError,
......
......@@ -320,7 +320,7 @@ import editForm from './editSeaAirForm.vue'
import ladingBill from "./ladingBill/index.vue";
export default {
name: 'box',
name: 'EcwBoxIndexseaair',
components: {
costForm,
regError,
......@@ -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);
......
......@@ -118,7 +118,7 @@ export default {
dialogCfg: {
title: "",
type: "",
width: "80%",
width: "100px",
// 是否显示弹出层
visible: false,
fullscreen: false,
......@@ -158,6 +158,9 @@ export default {
if (type === "query") {
this.getBillList();
}
if(type === 'close'){
this.$emit("closeDialog");
}
},
handleCommand(type, row) {
switch (type) {
......@@ -198,7 +201,7 @@ export default {
}
this.currRow = row;
this.$set(this.dialogCfg, "type", type);
this.$set(this.dialogCfg, "width", "750px");
this.$set(this.dialogCfg, "width", "1000px");
this.$set(this.dialogCfg, "visible", true);
},
makeBill(row) {
......
......@@ -4,7 +4,7 @@
<div class="title-orderNo">{{$t('订单号')}}{{orderNo}}</div>
</el-row>
<el-row class="ueditor-row">
<vue-ueditor-wrap v-model="billContent" :config="editorConfig" editor-id="billUeditor" style="max-width: 690px;" />
<vue-ueditor-wrap v-model="billContent" :config="editorConfig" editor-id="billUeditor" />
</el-row>
<!-- 审核流程 -->
......@@ -71,7 +71,7 @@ export default {
"redo", //重做
"bold", //加粗
"indent", //首行缩进
"snapscreen", //截图
//"snapscreen", //截图
"italic", //斜体
"underline", //下划线
"strikethrough", //删除线
......@@ -86,9 +86,9 @@ export default {
"preview", //预览
"horizontal", //分隔线
"removeformat", //清除格式
"time", //时间
"date", //日期
"unlink", //取消链接
//"time", //时间
//"date", //日期
//"unlink", //取消链接
"insertrow", //前插入行
"insertcol", //前插入列
"mergeright", //右合并单元格
......@@ -104,7 +104,7 @@ export default {
"deletetable", //删除表格
"cleardoc", //清空文档
"insertparagraphbeforetable", //"表格前插入行"
"insertcode", //代码语言
//"insertcode", //代码语言
"fontfamily", //字体
"fontsize", //字号
"paragraph", //段落格式
......@@ -112,11 +112,11 @@ export default {
"insertimage", //多图上传
"edittable", //表格属性
"edittd", //单元格属性
"link", //超链接
"emotion", //表情
//"link", //超链接
//"emotion", //表情
"spechars", //特殊字符
"searchreplace", //查询替换
"insertvideo", //视频
//"searchreplace", //查询替换
//"insertvideo", //视频
"justifyleft", //居左对齐
"justifyright", //居右对齐
"justifycenter", //居中对齐
......@@ -131,25 +131,25 @@ export default {
"rowspacingtop", //段前距
"rowspacingbottom", //段后距
"pagebreak", //分页
"insertframe", //插入Iframe
//"insertframe", //插入Iframe
"imagenone", //默认
"imageleft", //左浮动
"imageright", //右浮动
"attachment", //附件
//"attachment", //附件
"imagecenter", //居中
"wordimage", //图片转存
"lineheight", //行间距
"edittip ", //编辑提示
//"edittip ", //编辑提示
"customstyle", //自定义标题
"autotypeset", //自动排版
"touppercase", //字母大写
"tolowercase", //字母小写
//"touppercase", //字母大写
//"tolowercase", //字母小写
"background", //背景
"scrawl", //涂鸦
"music", //音乐
//"scrawl", //涂鸦
//"music", //音乐
"inserttable", //插入表格
"drafts", // 从草稿箱加载
"charts", // 图表
//"charts", // 图表
],
],
serverUrl:
......@@ -201,6 +201,7 @@ export default {
this.$emit("closeDialog", type);
},
jumpReviewDetail() {
this.close('close')
const { bpmProcessId } = this.currData;
toReviewDetail.apply(this, [bpmProcessId]);
},
......@@ -221,7 +222,7 @@ export default {
.shipping-makeLadingBill {
.title-orderNo {
text-align: center;
font-size: 28px;
font-size: 18px;
font-weight: normal;
margin-bottom: 10px;
}
......@@ -245,4 +246,10 @@ export default {
justify-content: center;
}
}
.shippingSea-dialog{
::v-deep .el-dialog__body{
padding-top: 0;
}
}
</style>
......@@ -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: {
/** 提交 */
......
......@@ -52,7 +52,8 @@
</div>
</el-form-item>
<el-form-item label="*运费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1">
<el-form-item label="运费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1">
<span slot="label"><span style="color: red">*</span>运费</span>
<div class="fee-item" v-for="(item, index) in fee[1]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}}
......@@ -178,7 +179,8 @@
prop="suitableLineType"
v-if="form.type != 1"
>
<dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" />
<!---第一个不是全部,所以不能使用defaultable-->
<dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" formatter="number" />
<routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" />
</el-form-item>
<el-form-item
......@@ -187,7 +189,7 @@
v-if="form.type != 1"
>
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<products-selector v-model="form.prodIds" />
<products-selector v-model="form.prodIds" :default-ids="form.prodIds" show-all @setall="isAllProduct=$event" :isall="isAllProduct" />
</el-form-item>
<el-form-item
:label="$t('订单属性')"
......@@ -210,7 +212,7 @@
prop="brand"
v-if="form.type != 1"
>
<dict-selector form-type="checkbox" :type="DICT_TYPE.BRAND_REG_TYPE" v-model="form.brandArr" multiple />
<dict-selector form-type="checkbox" :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" v-model="form.brandArr" multiple />
</el-form-item>
<el-form-item
:label="$t('是否控货')"
......@@ -285,7 +287,8 @@ export default {
1: [],
2: [],
3: []
}
},
isAllProduct: false, // 是否全部商品
};
},
computed:{
......@@ -358,6 +361,7 @@ export default {
this.$set(this.form, 'isCargoControlArr', ["0"])
this.$set(this.form, 'orderAttrArr', ["2","3","1"])
this.$set(this.form, 'brandArr', ["0","1"])
this.$set(this.form, 'suitableLineType', 0)
}
},
'form.isSimilarSuperposition'(val){
......@@ -392,6 +396,11 @@ export default {
if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => {
this.form = res.data
// 没有商品则表示全部
if(!this.form.prodIds){
this.isAllProduct = true
}
if(this.form.couponIds){
let couponIds = this.form.couponIds.split(',').filter(item => item && item != '')
console.log({couponIds})
......@@ -420,6 +429,13 @@ export default {
if(this.$route.query.action == 'copy'){
this.form.couponId = null
}
// 对没有默认值的给一个空表单
[1,2].forEach(type => {
if(!this.fee[type].length){
this.fee[type] = [{type}]
}
})
})
}
// 不是编辑查看则给默认的费用表格
......@@ -506,6 +522,11 @@ export default {
data.costType = 3
}
// 没勾选全部就需要选择商品
if(!this.isAllProduct && !this.form.prodIds){
return this.$message.error('请选择商品')
}
// 修改的提交
if (data.couponId != null) {
updateCoupon(data).then((response) => {
......
......@@ -182,7 +182,7 @@
<el-col :span="24" v-show="showZhong">
<el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showZhong1"></el-switch>
<customer-line-table v-show="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="0"></customer-line-table>
<customer-line-table v-if="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="1"></customer-line-table>
</el-form-item>
</el-col>
<el-col :span="13">
......@@ -196,7 +196,7 @@
<el-col :span="24" v-show="showPao">
<el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showPao1"></el-switch>
<customer-line-table v-show="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="1"></customer-line-table>
<customer-line-table v-if="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="2"></customer-line-table>
</el-form-item>
</el-col>
</el-row>
......@@ -281,9 +281,10 @@
>
<template v-slot = "{row}">
<el-form-item label="">
<el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<!-- <el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
</el-select> -->
<MemberSelector v-model="row.userid" size="mini" />
</el-form-item>
</template>
</el-table-column>
......@@ -410,6 +411,7 @@ import {
getCustomerPage, memberUserList,
updateCustomer,
userMemberUserList,
getCustomerLines
} from '@/api/ecw/customer'
import {getNodeList} from "@/api/ecw/node"
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -424,7 +426,8 @@ import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country'
import Template from "@/views/cms/template";
import {validatorMobile} from "@/api/ecw/validate"
import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
// import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
import MemberSelector from '@/components/MemberSelector'
export default {
name: "edit",
......@@ -434,13 +437,14 @@ export default {
components: {
Template,
upload,
CustomerLineTable
CustomerLineTable,
MemberSelector
},
created() {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect()
this.reset()
this.getUserMemberUserFn()
// this.getUserMemberUserFn()
if(this.customerId !== '0') {
// 编辑客户
this.getCustomer(this.customerId).then(() => {
......@@ -458,6 +462,25 @@ export default {
})
}
})
// 打开重泡货开关
if(this.form.weightUnit){
this.showZhong = true
}
if(this.form.lightUnit){
this.showPao = true
}
// 获取重泡货路线
getCustomerLines(this.customerId).then(res => {
console.log({getCustomerLines: res})
this.zhongLines = res.data.filter(item => item.zhongPaoType == 1)
this.paoLines = res.data.filter(item => item.zhongPaoType == 2)
if(this.zhongLines.length)this.showZhong1 = true
if(this.paoLines.length) this.showPao1 = true
// /admin-api/customer-line/get-by-customer
// /admin-api/customer-line/get-by-customer?customerId=29564
})
})
} else {
// 新建客户
......@@ -545,11 +568,11 @@ export default {
},
methods: {
getUserMemberUserFn(val){
/* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
this.memberList = r.data.list
})
},
}, */
remoteMethod(val){
this.getCustomerSelect(val);
},
......@@ -599,7 +622,7 @@ export default {
this.form.customerContacts[0].isDefault = 1
}
},
selectBD(val){
/* selectBD(val){
if(!val){
return
}
......@@ -607,8 +630,8 @@ export default {
if(i === undefined){
this.selectMemberList.push(this.memberList.find(item => item.id === val))
}
this.getUserMemberUserFn()
},
// this.getUserMemberUserFn()
}, */
/** 取消按钮 */
cancel() {
this.$tab.closePage()
......@@ -634,6 +657,17 @@ export default {
const form = {...this.form, type: this.form.type?.join(','), taxRate: Number(this.form.taxRate)}
// 检查路线是否启用了但是没选择目的仓
let errors = 0
form.customerLines.forEach(line => {
if(!line.objectiveIds || line.objectiveIds == ''){
errors ++
}
})
if(errors){
return this.$message.error('有两条路线未选择目的地')
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
......@@ -736,7 +770,7 @@ export default {
"position": "",
"social": undefined,
"socialNumber": "",
"userid": [],
"userid": undefined,
// "username": ""
})
},
......@@ -765,12 +799,12 @@ export default {
userId(){
return this.$store.state.user.id
},
userMemberUser(){
/* userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
})
return [...this.selectMemberList,...list]
},
}, */
productListFilter(){
return this.productList.filter((p) => p.typeId === this.form.productType)
},
......@@ -788,11 +822,11 @@ export default {
},
watch: {
zhongLines() {
console.log('zhongLines')
console.log('zhongLines', this.zhongLines)
this.updateCustomerLines()
},
paoLines() {
console.log('paoLines')
console.log('paoLines', this.paoLines)
this.updateCustomerLines()
}
}
......
......@@ -720,7 +720,9 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm(this.$t('是否确认删除客户编号为"') + id + this.$t('"的数据项?')).then(function() {
const name = row.name;
const number = row.number;
this.$modal.confirm(this.$t('是否确认删除客户编号为"') + number + this.$t('"的数据项?')).then(function() {
return deleteCustomer(id);
}).then(() => {
this.getList();
......
......@@ -86,10 +86,7 @@
<el-table-column :label="$t('赔付金额')" align="center" prop="handleAt" width="180">
<template slot-scope="scope">
{{ scope.row.status === 3 ? scope.row.indemnity : '/'}}
<dict-tag
v-if="scope.row.status === 3"
:value="scope.row.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-tag>
<span v-if="scope.row.status === 3">{{getCurrencyLabel(scope.row.currencyUnit)}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
......@@ -180,13 +177,9 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<dict-selector
defaultable
style="width: 110px"
:placeholder="$t('请选择货币单位')"
slot="append"
v-model="form.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-selector>
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')" required>
......@@ -246,7 +239,7 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')+':'">
<span>{{form.indemnity||0}}</span>
<dict-tag :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" :value="form.currencyUnit"></dict-tag>
<span>{{getCurrencyLabel(form.currencyUnit)}}</span>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')+':'">
<span>{{parseTime(form.handleAt)}}</span>
......@@ -280,13 +273,9 @@
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<dict-selector
defaultable
style="width: 110px"
:placeholder="$t('请选择货币单位')"
slot="append"
v-model="form.currencyUnit"
:type="DICT_TYPE.COMMISSION_CURRENCY_TYPE"></dict-selector>
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" :label="$t('处理时间')" required>
......@@ -309,6 +298,8 @@ import DictSelector from '@/components/DictSelector'
import { DICT_TYPE, getDictDataLabel, getDictDatas } from '@/utils/dict'
import { getBillNoSearch, getOrderNoSearch } from '@/api/ecw/order'
import customerSelect from '@/views/ecw/customer/customerSelect'
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "CustomerComplaint",
/**
......@@ -375,11 +366,17 @@ export default {
},
billList: [],
orderList: []
orderList: [],
params: {
page: 1,
rows: 20,
},
currencyList:[]
};
},
created() {
this.getList();
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
......@@ -391,7 +388,11 @@ export default {
}
})
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getOrderList(key){
getOrderNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
......
This diff is collapsed.
......@@ -181,7 +181,8 @@
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount" />
<el-table-column :label="$t('币种')" align="center" prop="currencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate">
......@@ -197,6 +198,7 @@
<el-table-column :label="$t('价税合计(RMB)')" align="center" prop="total" >
<template slot-scope="scope">
<span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span>
<!-- <span>{{scope.row.total}}</span> -->
</template>
</el-table-column>
</el-table>
......@@ -214,7 +216,6 @@
label=""
label-width="0"
style="margin-bottom: 0"
:error="$t('账单号不能为空')"
prop="accountNumber"
:rules="[
{ required: true, message: '账单号不能为空', trigger: 'blur' },
......@@ -386,8 +387,8 @@
</el-table-column>
<el-table-column :label="$t('金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table>
......@@ -523,6 +524,11 @@ export default {
},
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getList() {
this.loading = true;
// 处理查询参数
......@@ -542,6 +548,7 @@ export default {
});
},
getSummaries(param) {
console.log(param)
const { columns, data } = param;
const sums = new Array(columns.length).map(v => '');
const index = sums.length - 1
......@@ -619,6 +626,9 @@ export default {
},
selectChangeBank(val){
this.$forceUpdate()
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
this.form.supplierBank = bank.bankName
this.form.supplierBankAccountName = bank.accountName
},
selectChange(val) {
this.bankData = []
......@@ -648,9 +658,8 @@ export default {
},
handleSelectionChange(val) {
this.multipleSelection = val.map(v => {
if(v.currencyId === 1) return Object.assign(v, { exchangeRate: this.UStoRMB() })
if(v.currencyId === 2) return Object.assign(v, { exchangeRate: 1 })
if(v.currencyId === 3) return Object.assign(v, { exchangeRate: this.NANtoRMB() })
var rate = NP.divide(this.currencyList.find(vs => vs.id === v.currencyId).huilv, 100).toFixed(6)
return Object.assign(v, { exchangeRate: rate })
});
},
hiddenDialog() {
......
......@@ -67,26 +67,26 @@
</el-table-column>
<el-table-column :label="$t('单价金额')" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.unitPrice }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('税额')" align="center" prop="tax">
<template slot-scope="scope">
<span>{{ scope.row.tax }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.tax }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('价税合计')" align="center" prop="taxAndTotalAmount">
<template slot-scope="scope">
<span>{{ scope.row.taxAndTotalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.taxAndTotalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table>
......@@ -113,6 +113,7 @@ import { DICT_TYPE } from "@/utils/dict";
import { getReceiptInvoicing, getInvoicingItem, updateReceiptInvoicing } from "@/api/ecw/financial";
import NP from 'number-precision'
export default {
name: "OpenInvoice",
components: {},
......@@ -121,7 +122,12 @@ export default {
loading: false,
invoiceData: {},
id: 0,
list: []
list: [],
params:{
page:1,
rows:20,
},
currencyList:[]
};
},
created() {
......@@ -129,8 +135,14 @@ export default {
this.id = this.$route.query.id;
this.getData();
}
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
async getData() {
this.loading = true;
await getReceiptInvoicing(this.id).then((res) => {
......
......@@ -141,7 +141,7 @@
<el-table-column :label="$t('金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="创建时间" align="center" prop="channelName" />
......@@ -203,7 +203,7 @@
</el-form-item>
<el-form-item label="" label-width="0px">
<el-select v-model="costObj.currencyId" :placeholder="$t('请选择单位')">
<el-option v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-row>
......@@ -227,6 +227,7 @@ import { DICT_TYPE } from "@/utils/dict";
import { getTradeCityList } from "@/api/ecw/region";
import { getPayableList, deletePayable, updatePayable } from "@/api/ecw/financial"
import { getSupplierPage } from "@/api/ecw/supplier";
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "Payable",
......@@ -252,6 +253,7 @@ export default {
rows: 20,
},
allSupplier: [],
currencyList:[]
};
},
computed: {
......@@ -264,6 +266,7 @@ export default {
},
created() {
let that = this;
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList()
......@@ -286,6 +289,11 @@ export default {
this.loading = false;
});
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......
......@@ -154,14 +154,16 @@
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount" />
<el-table-column :label="$t('币种')" align="center" prop="currencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate" />
<el-table-column :label="$t('税率%')" align="center" prop="taxRate" />
<el-table-column :label="$t('价税合计(RMB)')" align="center" prop="total" >
<template slot-scope="scope">
<span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span>
<!-- <span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span> -->
<span>{{scope.row.total}}</span>
</template>
</el-table-column>
</el-table>
......@@ -326,6 +328,11 @@ export default {
},
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getList() {
this.loading = true;
// 处理查询参数
......
......@@ -16,7 +16,7 @@
{{ detail.applicationAt }}
</el-descriptions-item>
<el-descriptions-item :label="$t('供应商银行账号')" style="width: 50%">
{{ findBank(detail.supplierBankAccount) }}
{{ detail.supplierBankAccountName+'('+detail.supplierBankAccount+')' }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" class="card" border>
......@@ -49,7 +49,8 @@
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount" />
<el-table-column :label="$t('币种')" align="center" prop="currencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
{{getCurrencyLabel(scope.row.currencyId)}}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate">
......@@ -88,6 +89,7 @@
<script>
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept";
import { getCurrencyPage } from "@/api/ecw/currency";
import { getPaymentInfoByIds, getPaymentItem, paymentVerify } from "@/api/ecw/financial"
export default {
name: "CreatPayment",
......@@ -105,13 +107,16 @@ export default {
page: 1,
rows: 20,
},
currencyList:[],
deptData: [],
deptArr: [],
notes: ''
};
},
created() {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
let that = this;
if (that.$route.query.id && that.$route.query.id !== '0') {
this.id = this.$route.query.id;
getPaymentInfoByIds({ id: this.id }).then(res => {
......@@ -146,6 +151,11 @@ export default {
});
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getSummaries(param) {
const { columns, data } = param;
const sums = new Array(columns.length).map(v => '');
......
......@@ -134,16 +134,16 @@
>
<template slot-scope="scope">
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" @click="handleAdd(scope.row.id)" type="text">{{ $t('编辑') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" v-hasPermi="['ecw:payment:update']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" @click="verifyCancelClick(scope.row)">{{ $t('反审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" @click="verificationClick(scope.row)">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:payment:update']" @click="verifyCancelClick(scope.row)">{{ $t('反审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:payment:update']" @click="verificationClick(scope.row)">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.state == 4" size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ $t('反核销') }}</el-button>
<el-button v-if="scope.row.state == 4" size="mini" type="text" v-hasPermi="['ecw:payment:update']" @click="verificationCancelClick(scope.row)">{{ $t('反核销') }}</el-button>
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">开票</el-button> -->
<el-button size="mini" type="text" @click="toprint(scope.row.id)">{{ $t('打印') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button size="mini" type="text" @click="toprint(scope.row.id)" v-hasPermi="['ecw:payment:query']">{{ $t('打印') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text" v-hasPermi="['ecw:payment:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<!-- <el-button size="mini" type="text" @click="open = true">导出订单</el-button> -->
</template>
</el-table-column>
......
......@@ -33,13 +33,14 @@
<table border="1" style="margin-top: 20px;width: 100%;text-align: center;border-collapse: collapse;line-height: 2 ">
<tr>
<th style="width: 6%;">{{ $t('序号') }}</th>
<th style="width: 15%;">{{ $t('自编号') }}</th>
<th style="width: 11%;">{{ $t('自编号') }}</th>
<th style="width: 15%;">{{ $t('费用类型') }}</th>
<th style="width: 15%;">{{ $t('币种') }}</th>
<th style="width: 10%;">{{ $t('币种') }}</th>
<th style="width: 10%;">{{ $t('汇率') }}</th>
<th style="width:10%;">{{ $t('税率') }}</th>
<th style="width: 15%;">{{ $t('发票号') }}</th>
<th style="width: 12%;">{{ $t('应付金额') }}</th>
<th style="width: 12%;">{{ $t('申请金额') }}</th>
<th style="width: 10%;">{{ $t('应付金额') }}</th>
<th style="width: 10%;">{{ $t('申请金额') }}</th>
</tr>
<tr v-for="(item, index) in list" :key="index">
<td>{{ index + 1 }}</td>
......@@ -50,10 +51,11 @@
:value="item.feeType"
></dict-tag>
</td>
<td>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="item.currencyId" />
<td>{{getCurrencyLabel(item.currencyId)}}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="item.currencyId" /> -->
</td>
<td>{{ item.exchangeRate }}</td>
<td>{{ item.taxRate }}</td>
<td>{{ item.invoiceNumber }}</td>
<td>{{ item.totalAmount }}</td>
<td>{{ item.total }}</td>
......@@ -88,6 +90,7 @@
import { listSimpleDepts } from "@/api/system/dept"
// import { getReceipt} from "@/api/ecw/receipt";
import { getPaymentInfoByIds, getPaymentItem } from "@/api/ecw/financial"
import { getCurrencyPage } from "@/api/ecw/currency";
import lodop from '@/utils/lodop'
export default {
......@@ -110,7 +113,8 @@
},
// deptData:[],
// deptArr:[],
id:0
id:0,
currencyList:[]
}
},
created() {
......@@ -119,6 +123,7 @@
that.id = that.$route.query.id
that.getCollectionData()
}
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
userList('salesman').then(res =>that.creatorData = res.data)
getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
// listSimpleDepts().then(res =>{
......@@ -142,6 +147,11 @@
// })
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getCollectionData(){
let that = this
getPaymentInfoByIds({id:that.id}).then(res =>{
......@@ -182,7 +192,7 @@
},
totalMoney() {
const t = this.list.map(v => v.total).reduce((prev, curr) => {
return prev + curr;
return parseFloat(prev) + parseFloat(curr);
}, 0)
return t
},
......
......@@ -40,17 +40,17 @@
<td>{{ item.titleZh }}</td>
<td><dict-tag :value="item.feeType" :type="DICT_TYPE.FEE_TYPE"></dict-tag></td>
<td> {{item.totalAmount}}</td>
<td><dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="item.currencyId" /></td>
<td>{{getCurrencyLabel(item.currencyId)}}</td>
<td>{{ item.discountTotal||0 }}</td>
</tr>
<tr v-for="(items, indexs) in receiptAccountList" :key="indexs">
<td><dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="items.currencyId" />{{$t('应收合计')}}</td>
<td>{{getCurrencyLabel(items.currencyId)}}{{$t('应收合计')}}</td>
<td ><span v-if="items.discountTotal>0">{{ `${items.receivableAmount - items.discountTotal }(${items.receivableAmount} - ${items.discountTotal})` }}</span>
<span v-else>{{ `${items.receivableAmount - items.discountTotal }` }}</span>
</td>
<td>{{$t('汇率')}}</td>
<td>{{ items.collectionRate}}</td>
<td>{{$t('收款金额')}}(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="items.collectionCurrencyId" />)</td>
<td>{{$t('收款金额')}}({{getCurrencyLabel(items.collectionCurrencyId)}})</td>
<td colspan="3">{{ items.collectionAmount}}</td>
</tr>
</table>
......@@ -64,7 +64,7 @@
<p style="margin: 0;word-break: break-all;">A/C NO{{bankTiem.accountNo}}</p>
</div>
<div style="padding:6px 0;width: 87.5%;text-align: center;">
<p style="margin: 0;">{{$t('实收')}}<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="bankTiem.currencyId" />{{bankTiem.amount}}¥</p>
<p style="margin: 0;">{{$t('实收')}}{{getCurrencyLabel(bankTiem.currencyId)}}{{bankTiem.amount}}¥</p>
<!-- <p style="margin: 0;">未收:¥{{bankTiem.noReceipt}}</p> -->
</div>
</div>
......@@ -95,6 +95,7 @@
import lodop from '@/utils/lodop'
import NP from 'number-precision'
import {getOrder} from '@/api/ecw/order'
import { getCurrencyPage } from "@/api/ecw/currency";
import { getReceiptInfoByIds, getInvoicingItem,getReceiptAccountList,getReceivableItem} from "@/api/ecw/financial";
export default {
......@@ -121,13 +122,15 @@
id:0,
orderData:{},
detailed:[],
date:''
date:'',
currencyList:[]
}
},
async created() {
let that = this
// listSimpleUsers().then(res =>that.creatorData = res.data)
// getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
await listSimpleDepts().then(res =>{
res.data.forEach((item)=>{
if(item.parentId==0){
......@@ -204,6 +207,11 @@
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getList() {
getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data
......
This diff is collapsed.
......@@ -216,14 +216,14 @@
</el-table-column>
<el-table-column :label="$t('单价')" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.unitPrice }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column
......@@ -255,6 +255,7 @@ import { DICT_TYPE } from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import { getTradeCityList } from "@/api/ecw/region";
import { getReceivableList } from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "Receivable",
......@@ -280,10 +281,16 @@ export default {
rows: 20,
},
tradeCityList: [],
params: {
page: 1,
rows: 20,
},
currencyList:[]
};
},
created() {
let that = this;
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList();
......@@ -297,6 +304,11 @@ export default {
},
},
methods: {
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
/** 查询列表 */
getList() {
this.loading = true;
......
......@@ -184,6 +184,7 @@
size="mini"
type="text"
@click="verificationCancelClick(scope.row)"
v-hasPermi="['ecw:verification:update']"
>{{ $t('反核销') }}</el-button
>
<el-button
......@@ -200,6 +201,7 @@
size="mini"
type="text"
@click="toprint(scope.row.id)"
v-hasPermi="['ecw:verification:create']"
>{{ $t('打印') }}</el-button
>
<el-button
......
......@@ -9,7 +9,7 @@
<el-button size="mini" type="primary" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button>
<el-button type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button>
<el-button type="primary" v-if="[3,7].indexOf(list.status) > -1" size="mini" @click="toResult">{{$t('结果')}}</el-button>
<el-button size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click="$router.push('/offer/special/' + offerId)">{{$t('特价')}}</el-button>
<el-button size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)" >{{$t('特价')}}</el-button>
<el-button type="danger" size="mini" @click="handleDelete">{{$t('删除')}}</el-button>
</div>
</div>
......
......@@ -356,7 +356,7 @@
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
-{{row.reduceAmount}}
-{{row.reduceTotalAmount}}
{{currencyMap[row.reduceCurrencyId]}}
</template>
</el-table-column>
......@@ -678,7 +678,7 @@ export default {
titleZh: it.titleZh,
titleEn: it.titleEn,
endTime: it.endTime,
reduceAmount: it.reduceAmount,
reduceTotalAmount: it.reduceTotalAmount,
reduceCurrencyId: it.reduceCurrencyId
})
}
......@@ -736,7 +736,7 @@ export default {
}
let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
if(coupon){
it.amount = it.amount.minus(coupon.reduceAmount)
it.amount = it.amount.minus(coupon.reduceTotalAmount)
}
if(this.form.otherFee && this.form.otherFeeCurrencyId == item.currencyId){
it.amount = it.amount.plus(this.form.otherFee)
......
......@@ -7,14 +7,14 @@
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发')" prop="startWarehouseId">
<el-form-item :label="$t('始发')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的')" prop="destWarehouseId">
<el-form-item :label="$t('目的')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId">
......@@ -157,16 +157,16 @@ import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import { getTradeCityList } from '@/api/ecw/region'
/* 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, getPickRleaseInfo } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
export default {
name: "OrderCargonControl",
name: "EcwOrderCargonControl",
components: {
CustomerSelector, ProductSelector, Selector, Transfer, Release,CargoControlEdit, TransferCargo, Fallback
},
......@@ -196,6 +196,7 @@ export default {
rows: 10
},
tradeCityList: [],
warehouseList: [],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
......@@ -215,6 +216,12 @@ export default {
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
},
exportWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
......@@ -224,10 +231,14 @@ export default {
return Object.assign({}, this.queryParams, timeParams)
}
},
activated(){
this.handleQuery()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
},
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('订单状态')">
......
......@@ -49,6 +49,7 @@ export default {
return deletePickup({id})
}).then(res => {
this.$message.success('操作成功')
this.$emit('delete', id)
})
},
closeDialog(){
......
......@@ -14,7 +14,10 @@
<el-form-item v-for="(item,index) in this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS)" v-if="advanceType.indexOf(item.value) > -1" :key="item.value" :label="item.label + '预计金额'">
<el-input style="width: 300px;" v-model="specialNeedsList[index].transFee">
<div style="width: 100px;" slot="append" >
<dict-selector v-model="specialNeedsList[index].transCurrency" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" ></dict-selector>
<!-- <dict-selector v-model="specialNeedsList[index].transCurrency" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" ></dict-selector> -->
<el-select v-model="specialNeedsList[index].transCurrency">
<el-option v-for="item in JSON.parse(currency)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</div>
</el-input>
<div style="display: inline-block;margin-left: 20px;">
......@@ -35,6 +38,7 @@
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate,getSpecialListByOrderId} from "@/api/ecw/order";
export default {
name: "specialNeeds",
props:{
......@@ -43,6 +47,7 @@ export default {
},
orderNo:[String,Number],
show:Boolean,
currency:String
},
computed:{
......@@ -56,8 +61,10 @@ export default {
specialNeedsList:[],
todoDetail:'',
echoList:[],
}
},
methods:{
submit(){
this.specialNeedsList.forEach(i => {
......
......@@ -260,7 +260,7 @@ export default {
getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details)
const orderItem = this.FeeDetails.orderItemVOList.find(e => e.brand === this.FeeDetails.details.brand)
const orderItem = this.FeeDetails.orderItemVOList.find(e => e.orderItemId === this.FeeDetails.details.orderItemId)
if (orderItem){
this.prodName = orderItem.prodTitleZh + '(' + orderItem.prodTitleEn + ')'
}
......
......@@ -45,7 +45,7 @@
<el-descriptions border :title="$t('物流信息')" :column="2">
<el-descriptions-item :label="$t('始发仓')">{{order.logisticsInfoDto.startTitleZh}}</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')">{{order.logisticsInfoDto.destTitleZh}}</el-descriptions-item>
<el-descriptions-item :label="$t('地址')" :span="2">{{order.logisticsInfoDto.startAddressZh}}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('地址')" :span="2">{{order.logisticsInfoDto.startAddressZh}}</el-descriptions-item> -->
<el-descriptions-item :label="$t('运输方式')" :span="2">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
......@@ -145,7 +145,11 @@
{{order.inWarehouseState > 1 && row.warehouseInInfoVO ? row.warehouseInInfoVO.weight : row.weight}}
</template>
</el-table-column>
<el-table-column prop="warehouseInInfoVO.quantityAll" :label="$t('数量') + '(个)'" width="90px"/>
<el-table-column prop="warehouseInInfoVO.quantityAll" :label="$t('数量') + '(个)'" width="90px">
<template slot-scope="{row}">
{{(order.inWarehouseState > 1 && row.warehouseInInfoVO) ? row.warehouseInInfoVO.quantityAll : row.quantity}}
</template>
</el-table-column>
<el-table-column prop="" :label="$t('费用类型')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.isPayAdvance" />
......
This diff is collapsed.
......@@ -12,7 +12,17 @@
<span style="margin: 0 8px;">{{$t('')}}</span>
<el-date-picker clearable v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择结束日期')" />
</el-form-item>
<el-form-item :label="$t('始发地')+':'">
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('始发地')+':'">
<el-select v-model="queryParams.originId" :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in expoerCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
......@@ -21,7 +31,7 @@
<el-select v-model="queryParams.destinationId" :placeholder="$t('请选择目的地')" clearable>
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id" ></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item :label="$t('运输方式')+':'" >
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :clearable="true" v-model="queryParams.transportId" />
</el-form-item>
......@@ -155,9 +165,10 @@ import {DICT_TYPE} from '@/utils/dict'
import {listServiceUser} from "@/api/system/user"
import CustomerSelector from '@/components/CustomerSelector'
import ProductSelector from '@/components/ProductSelector'
import {getWarehouseList} from '@/api/ecw/warehouse'
export default {
name: "Exception",
name: "EcwOrderException",
components: {
CustomerSelector,ProductSelector
},
......@@ -179,14 +190,20 @@ export default {
rows: 10
},
tradeCityList:[],
warehouseList:[],
};
},
activated(){
this.handleQuery()
},
created() {
this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
// getTradeCityList().then(res => this.tradeCityList = res.data)
listServiceUser().then(r => {
this.creatorData = r.data
})
getWarehouseList().then(res => this.warehouseList = res.data)
// userList('salesman').then(res =>this.creatorData = res.data)
},
computed:{
......@@ -196,7 +213,13 @@ export default {
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
methods: {
/** 查询列表 */
......
......@@ -28,7 +28,10 @@
</el-table-column>
<el-table-column :label="$t('货币类型')">
<template v-slot:default = 'scope'>
<dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" />
<el-select :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.applicationFeeCurrency">
<el-option v-for="item in JSON.parse(currencys)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
<!-- <dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('付款类型')">
......@@ -91,7 +94,8 @@ export default {
dialogVisible:{
type:Boolean,
default:false,
}
},
currencys:String
},
data(){
return {
......
......@@ -185,16 +185,13 @@
<el-dropdown-menu slot="dropdown">
<!-- 编辑 -->
<template v-if="
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.status, [20,21]) &&
exclude(scope.row.shipmentState, [320,322,323]) &&
exclude(scope.row.inWarehouseState, [ 212, 218, 213, 214, 215])
( scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314) ) && !scope.row.abnormalState
">
<el-dropdown-item @click.native="handleUpdate(scope.row)" v-hasPermi="['ecw:order:update']" >{{$t('编辑')}}</el-dropdown-item>
</template>
<!-- 删除 -->
<template v-if="include(scope.row.status, [0,2])">
<template v-if="include(scope.row.status, [0,2, 88])">
<el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'deleteOrder')" v-hasPermi="['ecw:order:delete']" >{{$t('删除')}}</el-dropdown-item>
</template>
......@@ -208,16 +205,14 @@
<!-- 费用申请 -->
<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.status, [0, 88]) && !scope.row.abnormalState
">
<el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item>
</template>
<!-- 特需,互斥,关联 -->
<template v-if="
exclude(scope.row.status, [0]) &&
include(scope.row.status, [2,3,5,8,9,10]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.inWarehouseState, [204])
">
......@@ -229,18 +224,15 @@
<!-- 特价 -->
<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>
<!-- 确认提货 -->
<template v-if="
exclude(scope.row.status, [0,2]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323]) &&
exclude(scope.row.inWarehouseState, [201])
scope.row.status >= 5 &&
!scope.row.abnormalState
">
<el-dropdown-item @click.native="$router.push(`/order/release?orderId=${scope.row.orderId}`)" >{{$t('确认提货')}}</el-dropdown-item>
</template>
......@@ -257,17 +249,17 @@
</template>
<!-- 合单日志,提货日志 -->
<template v-if="scope.row.status > 2">
<template v-if="scope.row.status >= 5 && scope.row.status < 12 && !scope.row.abnormalState || (scope.row.status == 12 && scope.row.shipmentState == 314) ">
<el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" >{{$t('合单日志')}}</el-dropdown-item>
<el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" >{{$t('提货日志')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
<el-divider direction="vertical"></el-divider>
<el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider>
<!--仓库相关的-->
<el-dropdown>
<el-dropdown v-if="scope.row.status != 0">
<el-button type="text">{{$t('仓库')}}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 入仓操作 -->
......@@ -333,10 +325,10 @@
</el-dropdown-menu>
</el-dropdown>
<el-divider direction="vertical"></el-divider>
<el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider>
<!--打印相关的-->
<el-dropdown>
<el-dropdown v-if="scope.row.status != 0">
<el-button type="text">{{$t('打印')}}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 打印标签 -->
......@@ -370,16 +362,16 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<special-needs :orderNo="orderNo" :show.sync="isShow" :order-id="orderId" @determine="getList" ></special-needs>
<special-needs :orderNo="orderNo" :show.sync="isShow" :currency="JSON.stringify(currencyList)" :order-id="orderId" @determine="getList" ></special-needs>
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillOrderId !== null" :order-id="printLadingBillOrderId" @close="printLadingBillOrderId=null" />
<batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose"/>
<withdrawal v-if="show" :dialog-visible="show" :orderId="orderId" ></withdrawal>
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
<fee-application :order-id="orderId" :currencys="JSON.stringify(currencyList)" :dialog-visible.sync="feeApplicationBol"></fee-application>
<merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" @delete="getList" />
</div>
</template>
......@@ -414,8 +406,9 @@ import FeeApplication from "@/views/ecw/order/feeApplication";
import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
export default {
name: "Order",
name: "EcwOrderIndex",
components: {
UserSelector,
FeeApplication,
......@@ -477,7 +470,12 @@ export default {
multipleSelection:[],
transportId: null, // 指定运输方式
orderNo:''
orderNo:'',
params: {
page: 1,
rows: 20,
},
currencyList:[]
};
},
computed: {
......@@ -520,12 +518,17 @@ export default {
}
}
},
activated(){
this.handleQuery()
},
created() {
this.getTransportFromRoute()
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
// 提取路径中的运输方式
......
......@@ -4,6 +4,7 @@
<script>
import Index from './index'
export default {
name: 'EcwOrderMine',
components: {Index}
}
</script>
\ No newline at end of file
......@@ -272,8 +272,8 @@
<!-- <el-select v-model="handlerParams.currency" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> -->
<dict-tag type="shipping_price_unit" v-model="handlerParams.currency" class="w-100 ml-10" />
</el-select> -->{{getCurrencyLabel(handlerParams.currency)}}
<!-- <dict-tag type="shipping_price_unit" v-model="handlerParams.currency" class="w-100 ml-10" /> -->
</el-form-item>
</el-row>
......@@ -281,8 +281,8 @@
<el-form-item :label="$t('送货费用')+':'" size="medium">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</el-row>
......@@ -313,8 +313,8 @@
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
</el-row>
......@@ -430,6 +430,11 @@
},
methods: {
/** 查询列表 */
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
return ''
},
getList() {
let that = this
that.loading = true;
......
......@@ -276,7 +276,7 @@ export default {
},
submitForm(){
let that = this
if(!that.orderNos){
if(!that.orderNos||that.orderNos.length==0){
that.$message.error(this.$t("请选择待合单的订单"));
return
}
......
......@@ -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>
......
......@@ -96,7 +96,7 @@
</el-row>
<el-row v-if="scope.row.warehouseInInfoVO">
<span>{{$t('品牌')}}
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</span>
<span style="margin-left: 10px;">{{$t('箱数')}}{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.cartonsNum}}</span>
<span style="margin-left: 10px;">{{$t('体积')}}{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.volume}}</span>
......@@ -189,23 +189,20 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="$t('新建拆单')" :visible.sync="open" width="400px" append-to-body>
<el-form ref="formSplit" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-form-item :label="$t('运输方式')+':'">
<dict-selector :clearable="true" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number"/>
<el-form-item :label="$t('运输方式')">
<dict-selector :clearable="true" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" @change="changeTransport" v-model="form.transportId" />
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('目的仓库')+':'" >
<el-select v-model="form.destWarehouseId" :placeholder="$t('请选择目的仓库')" clearable>
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id" ></el-option>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'">
<el-select v-model="form.channelId" :placeholder="$t('请选择出货渠道')" :clearable="true">
<el-option :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" v-for="item in channelData" :key="item.channelId" :label="$l(item, 'name')" :value="item.channelId"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" >
<el-select v-model="form.channelId" :placeholder="$t('请选择出货渠道')" clearable>
<el-option :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" v-for="item in channelData" :key="item.channelId" :label="item.nameZh" :value="item.channelId"/>
<el-form-item :label="$t('目的仓库')" >
<el-select v-model="form.destWarehouseId" @change="changeDeatWarehouseId" :placeholder="$t('请选择目的仓库')" :clearable="true">
<el-option v-for="items in importCityList" :label="$l(items, 'title')" :value="items.id" :key="items.id" ></el-option>
</el-select>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -373,6 +370,16 @@ export default {
}
return data
},
changeTransport(e){
this.$set(this.form,'transportId',e)
console.log(this.form.transportId)
this.$forceUpdate()
},
changeDeatWarehouseId(e){
this.$forceUpdate()
this.$set(this.form,'destWarehouseId',e)
console.log(this.form.destWarehouseId)
},
getOrder(){
this.loading = true;
getOrder(this.queryParams.orderId).then(response => {
......
......@@ -57,7 +57,7 @@
</el-descriptions-item>
</el-descriptions>
<el-form-item label="材质" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
<el-form-item label="入仓时间" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" placeholder="请选择入仓时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
......@@ -82,11 +82,14 @@
<el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<span v-if="tableData[$index].id && !edit">
{{ tableData[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData[$index].unit) }}
{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}
</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData[$index].unit) }}</span>
<template v-else>
<el-input v-model="tableData[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</template>
</el-form-item>
</template>
</el-table-column>
......@@ -362,7 +365,7 @@
<script>
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {getWarehouseLastUpdateApprovalInfo, orderWarehouseIn, orderWarehouseInUpdateApply} from '@/api/ecw/order'
import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow"
......@@ -419,6 +422,7 @@ export default {
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
opened: false,
brandList: [],
formRules: {
......@@ -560,15 +564,17 @@ export default {
})
},
handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index]
setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.tableData1 : this.tableData)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3) {
result = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
} else {
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.tableData1 : this.tableData)[index].volume = result
}, 0)
},
handleSubmit() {
const orderWarehouseInItemDoList = [
......@@ -624,8 +630,8 @@ export default {
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: this.warehousing.volume?.toFixed(2) || '',
weight: this.warehousing.weight?.toFixed(2) || '',
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.warehousing.prodId,
"orderWarehouseInUpdateItemDoList": this.tableData.map(e => {
return {
......@@ -691,7 +697,8 @@ export default {
"quantityAll": "",
"unit": "1",
"volume": '',
"weight": ''
"weight": '',
specificationType: '1'
})
}
},
......
......@@ -67,9 +67,15 @@
prop="diffType"
v-slot="{row}"
:label="$t('状态')">
<dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/>
<span class="red" v-else-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
<span v-else>{{ $t('待入仓') }}</span>
<dict-tag
v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType"
:type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS"
:value="row.warehouseInInfoVO.diffType"
class="red"
:class="{green: row.warehouseInInfoVO.diffType === 4}"
/>
<span :class="{red: row.itemStatus === 3}" v-else>{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}</span>
<span class="red" v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
</el-table-column>
<el-table-column
prop="address"
......
......@@ -436,7 +436,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
// this.reset();
const id = row.id;
getProduct(id).then(response => {
this.form = {...response.data};
......@@ -446,7 +446,7 @@ export default {
attrArray[index] = parseInt(value);
}
this.$nextTick(() =>{
this.form.attrArray = attrArray
this.$set(this.form, 'attrArray', attrArray)
})
this.open = true;
this.title = this.$t("修改商品");
......
......@@ -19,7 +19,7 @@
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.packaging" />
</el-form-item>
<el-form-item :label="$t('是否预约入仓')" prop="needBook">
<dict-selector formatter="bool" form-type="radio" :type="DICT_TYPE.ECW_YESNO" v-model="form.needBook" :formater="Boolean" />
<dict-selector form-type="radio" :type="DICT_TYPE.ECW_YESNO" v-model="form.needBook" formatter="number" />
</el-form-item>
<el-form-item :label="$t('每日入仓上限')" prop="dayLimit" v-if="form.needBook">
<el-input placeholder="" v-model="form.dayLimit" class="w-200">
......
This diff is collapsed.
......@@ -152,7 +152,7 @@
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id"
:check-strictly="form.menuCheckStrictly" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
:check-strictly="true" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -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