Commit 53ff8b17 authored by huhaiqing106's avatar huhaiqing106

Merge branch 'dev' of...

Merge branch 'dev' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into remote-seaship
parents a8a872d0 cd5759cf
......@@ -26,14 +26,6 @@ export function deleteOrderWarehouseIn(id) {
})
}
// 获得入仓货物详情
export function getOrderWarehouseIn(id) {
return request({
url: '/depository/order-warehouse-in/get?id=' + id,
method: 'get'
})
}
// 获得入仓货物详情分页
export function getOrderWarehouseInPage(query) {
return request({
......
......@@ -120,3 +120,31 @@ export function getLadingBill(query){
params: query,
})
}
// 获得入仓货物详情
export function getOrderWarehouseIn(id) {
return request({
url: '/order/order-warehouse-in/get-order-warehouse-in?orderId=' + id,
method: 'get'
})
}
// 入仓
export function orderWarehouseIn(data){
return request({
url: '/order/order-warehouse-in/create',
method: 'post',
data
})
}
// 入仓完成
export function orderWarehouseInFinish(data){
return request({
url: '/order/order-warehouse-in/finish',
method: 'post',
data
})
}
......@@ -45,7 +45,7 @@
</el-tabs>
<span slot="footer">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="opened = false">提 交</el-button>
<el-button type="primary" @click="handleSubmit()">提 交</el-button>
</span>
</el-dialog>
</div>
......@@ -61,6 +61,7 @@ export default {
type: Boolean,
default: false
},
value: String
},
data() {
......@@ -92,6 +93,10 @@ export default {
},
methods: {
handleSubmit() {
this.$emit('input', this.selected.join(','))
this.opened = false
},
handleClose() {},
handleSelectWarehouse(warehouse) {
this.activeWarehouse = warehouse
......
......@@ -147,13 +147,13 @@ export const DICT_TYPE = {
PAYMENT_TYPE:'payment_type',//收款类型
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'fee_type',
FEE_TYPE:'receivable_fee_type',
// PAY_TYPE:'payment_type',
RECEIVE_FLAG:'receive_flag',
COMDINED_VALUE_ADDED_FEE:'combined_value_added_fee',
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state',
// ========== 出货模块 ==========
BOX_SHIPMENT_TRAILER_STATUS: 'shipment_trailer_status', // 拖车状态
}
......
......@@ -5,12 +5,11 @@
title="入仓-货物入仓"
:visible.sync="opened"
width="960px"
:before-close="handleClose()"
>
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名"></el-descriptions-item>
<el-descriptions-item label="英文品名"></el-descriptions-item>
<el-descriptions-item label="品牌"></el-descriptions-item>
<el-descriptions-item label="品牌">{{['无牌', '有牌', '中性'][warehousing.brandType]}}</el-descriptions-item>
<el-descriptions-item label="是否备案"></el-descriptions-item>
<el-descriptions-item label="填单参数"></el-descriptions-item>
</el-descriptions>
......@@ -26,45 +25,95 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>入仓记录</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle></el-button>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-table
:data="[]"
:data="warehousing.orderWarehouseInBackItemDoList"
style="width: 100%">
<el-table-column label="箱数" prop="cartonsNum">
</el-table-column>
<el-table-column label="包装类型" prop="boxGauge">
</el-table-column>
<el-table-column label="长(cm)" prop="">
</el-table-column>
<el-table-column label="款(cm)" prop="">
</el-table-column>
<el-table-column label="高(cm)" prop="">
</el-table-column>
<el-table-column label="体积(m³)" prop="">
</el-table-column>
<el-table-column label="重量(Kg)" prop="">
</el-table-column>
<el-table-column label="数量" prop="quantityAll">
</el-table-column>
<el-table-column label="快递单号" prop="expressNo">
</el-table-column>
</el-table>
<el-table
:data="warehousingInNewList"
style="width: 100%">
<el-table-column label="箱数">
<template v-slot="{r,c,$index}">
<el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="包装类型">
<template v-slot="{r,c,$index}">
<el-input v-model="warehousingInNewList[$index].boxGauge" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="款(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="高(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="体积(m³)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="重量(Kg)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="数量">
<template v-slot="{r,c,$index}">
<el-input v-model="warehousingInNewList[$index].quantityAll" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="快递单号">
<template v-slot="{r,c,$index}">
<el-input v-model="warehousingInNewList[$index].expressNo" placeholder=""></el-input>
</template>
</el-table-column>
</el-table>
</el-card>
<span slot="footer">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="opened = false">提 交</el-button>
<el-button type="primary" @click="handleSubmit()">提 交</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getOrderWarehouseIn} from "@/api/ depository/orderWarehouseIn"
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE} from "@/utils/dict"
import warehousing from "@/views/ecw/order/warehousing"
import {orderWarehouseIn} from "@/api/ecw/order"
export default {
name: 'editDialog',
......@@ -78,7 +127,16 @@ export default {
type: Boolean,
default: false
},
id: Number
warehousing: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
mounted() {
......@@ -90,9 +148,10 @@ export default {
opened: false,
form: {
material: undefined,
time: 0
inTime: 0
},
orderItem: {}
// orderItem: {}
warehousingInNewList: []
};
},
......@@ -100,16 +159,16 @@ export default {
visible(val) {
if (val) {
this.opened = true
if (this.id) {
getOrderWarehouseIn(this.id).then(r => {
this.orderItem = r.data
})
if (this.warehousing) {
// this.orderItem = this.warehousing
this.inTime = this.warehousing.inTime
}
} else {
}
},
opened(val) {
if (val) {
this.form.material = warehousing.material
} else {
this.$emit('update:visible', false)
}
......@@ -117,7 +176,55 @@ export default {
},
methods: {
handleClose() {},
handleSubmit() {
Promise.all(
this.warehousingInNewList.map(e => {
return orderWarehouseIn({
...e,
inTime: this.form.inTime,
material: this.form.material,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo
})
})
).then(() => {
this.handleClose()
})
},
handleClose() {
this.warehousingInNewList = []
this.opened = false
},
handleDelete() {
this.warehousingInNewList.pop()
},
handleAdd() {
this.warehousingInNewList.push({
"boxGauge": "",
"brand": "",
"brandType": 0,
"cartonsNum": 0,
"expressNo": "",
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"prodAttrIds": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"quantityAll": 0,
"type": 0,
"unit": "package",
"volume": 0,
"weight": 0
})
}
}
}
</script>
......
......@@ -54,8 +54,8 @@
<el-table-column
prop="address"
label="操作">
<template v-slot="{row}">
<el-button size="mini" type="text" @click="handleWarehousing(row.prodId)">入仓</el-button>
<template v-slot="{ row, column, $index }">
<el-button size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousing(row.prodId)">追加</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template>
......@@ -151,19 +151,19 @@
<div style="text-align: center">
<el-button type="primary">转异</el-button>
<el-button type="primary">完成入仓</el-button>
<el-button type="primary" @click="handleSubmit()">完成入仓</el-button>
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible"></warehouse-area-dialog>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog>
<edit-dialog :visible.sync="warehousingVisible" :id="warehousingId"></edit-dialog>
<edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {getOrder} from "@/api/ecw/order"
import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish} from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
......@@ -181,6 +181,7 @@ export default {
if(this.$route.query.id){
this.orderId = this.$route.query.id
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
}
getCurrencyList().then(res => this.currencyList = res.data)
},
......@@ -188,6 +189,7 @@ export default {
data() {
return {
areaVisible: false,
locationName: '',
warehousingVisible: false,
form: {
a: '',
......@@ -195,13 +197,20 @@ export default {
},
currencyList:[],
order: {},
warehousingId: undefined
orderItemList: [],
warehousing: undefined
}
},
methods: {
handleWarehousing(id) {
this.warehousingId = id
handleSubmit() {
orderWarehouseInFinish({
"locationName": this.locationName,
"orderId": this.order.orderId
})
},
handleWarehousing(index) {
this.warehousing = {...this.order.orderItemVOList[index], ...this.orderItemList[index]}
this.warehousingVisible = true
},
handleWarehousingReturn(item){
......@@ -222,6 +231,15 @@ export default {
});
});
}
},
watch: {
warehousingVisible(val) {
if (!val){
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
}
}
}
}
</script>
......
......@@ -3,37 +3,55 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="商品类型" prop="typeId">
<el-input v-if="productDisabled && productType" :value="productType.titleZh" disabled />
<el-select v-if="!productDisabled" v-model="form.productType">
<el-select v-model="form.productType" :disabled="!!$route.query.ids">
<el-option v-for="type in productTypeList" :key="type.id" :label="type.titleZh" :value="type.id" />
</el-select>
</el-form-item>
<el-form-item label="商品名称" prop="titleZh">
<el-input v-if="productDisabled" :value="product ? product.titleZh : null" disabled />
<product-selector v-else v-model="form.productId" :product-type="form.productType" @change="product = $event" />
<product-selector v-model="form.productId" :product-type="form.productType" @change="product = $event" :disabled="!!$route.query.ids" />
</el-form-item>
<el-form-item label="英文名称" prop="titleEn">
<el-input :value="product ? product.titleEn : ''" disabled />
</el-form-item>
<el-form-item label="路线" prop="lineChannelList" v-if="lineList && lineList.length == 1">
<el-input v-for="item in lineList"
<!--单条路线修改-->
<!-- <el-form-item label="路线" prop="lineChannelList" v-if="!$route.query.ids">
<el-input
v-for="item in lineList"
:key="item.lineId"
:value="'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
disabled/>
</el-form-item>--
<!--多条路线批量修改-->
<el-form-item label="路线" prop="lineChannelList" v-if="lineList.length">
<template v-if="lineList.length == 1">
<el-input
v-for="item in lineList"
:key="item.id"
:value="!item.warehouseLineDO ? '数据异常,缺少warehouseLineDO字段' : '【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
disabled />
</el-form-item>
<el-form-item label="路线" prop="lineChannelList" v-else>
<el-checkbox-group v-model="checkList">
<el-checkbox v-for="item in lineList" :label="item.id">
{{ '' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' +
</template>
<el-checkbox-group v-else v-model="checkList">
<el-checkbox
v-for="item in lineList"
:key="item.id"
:label="item.id"
:disabled="!item.warehouseLineDO"
style="display:block"
>
{{
!item.warehouseLineDO ? '数据异常,缺少warehouseLineDO字段' :
'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' +
item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<routers-selector v-if="!form.id" v-model="selectedRoutes" />
<routers-selector v-if="!$route.query.ids" v-model="selectedRoutes" />
<el-card style="margin-bottom: 10px">
<div slot="header" style="font-size:20px;">
价格设置
......@@ -41,11 +59,7 @@
<el-form-item label="默认运费" prop="transportPrice">
<el-row :gutter="20">
<el-col :span="4">
<selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.transportPriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> -->
<selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
<el-col :span="6">
......@@ -54,22 +68,14 @@
<el-col :span="4">
/
<selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.transportVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> -->
<selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
</el-row>
</el-form-item>
<el-form-item label="默认清关费" prop="clearancePrice">
<el-row :gutter="20">
<el-col :span="4">
<selector v-model="form.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.clearancePriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> -->
<selector v-model="form.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
<el-col :span="6">
......@@ -78,26 +84,19 @@
<el-col :span="4">
/
<selector v-model="form.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.clearanceVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> -->
<selector v-model="form.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
</el-row>
</el-form-item>
<!--特需-->
<template v-for="(special, specialIndex) in this.specialProducts">
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '运费'"
:key="specialIndex + 'transport'">
<el-row :gutter="20">
<el-col :span="4">
<selector v-model="special.transportPriceUnit" :options="currencyList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.transportPriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> -->
<selector v-model="special.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
<el-col :span="6">
......@@ -105,13 +104,7 @@
</el-col>
<el-col :span="4">
/
<selector v-model="special.transportVolumeUnit" :options="unitList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.transportVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> -->
/ <selector v-model="special.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
</el-row>
</el-form-item>
......@@ -120,11 +113,7 @@
:key="specialIndex + 'clearance'">
<el-row :gutter="20">
<el-col :span="4">
<selector v-model="special.clearancePriceUnit" :options="currencyList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.clearancePriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> -->
<selector v-model="special.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
<el-col :span="6">
......@@ -132,12 +121,7 @@
</el-col>
<el-col :span="4">
/
<selector v-model="special.clearanceVolumeUnit" :options="unitList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.clearanceVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> -->
/ <selector v-model="special.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</el-col>
</el-row>
</el-form-item>
......@@ -146,9 +130,6 @@
<el-form-item label="是否预付" prop="advanceStatus">
<dict-selector form-type="radio" :type="DICT_TYPE.ADVANCE_STATUS" v-model="form.advanceStatus" />
<!-- <el-radio-group v-model="form.advanceStatus">
<el-radio v-for="advanceDict in advanceStatusDictDatas" :key="advanceDict.value" :label="parseInt(advanceDict.value)">{{advanceDict.label}}</el-radio>
</el-radio-group> -->
</el-form-item>
</el-card>
......@@ -168,9 +149,6 @@
</el-form-item>
<el-form-item label="货柜位置" prop="containerLocation">
<!-- <el-select v-model="form.containerLocation" placeholder="选择货柜位置" clearable>
<el-option v-for="locationItem in locationList" :key="locationItem.value" :label="locationItem.label" :value="locationItem.value"/>
</el-select> -->
<dict-selector :type="DICT_TYPE.ECW_CONTAINER_LOCATION" v-model="form.containerLocation" />
</el-form-item>
......@@ -178,8 +156,6 @@
<el-input v-model.number="form.square" type="number" style="width:200px" />
</el-form-item>
</el-card>
</el-form>
<div style="margin: 20px 0">
......@@ -191,7 +167,6 @@
<script>
import RoutersSelector from '@/components/RoutersSelector'
import { createProductPrice, updateProductPrice, batchUpdateProductPrice, deleteProductPrice, getProductPrice, getProductPriceList, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice";
import { getProduct } from '@/api/ecw/product'
import { getProductType, getProductTypeList } from '@/api/ecw/productType'
import { getCurrencyList } from '@/api/ecw/currency';
import { getUnitList } from '@/api/ecw/unit';
......@@ -262,14 +237,6 @@ export default {
}
}
}
/* clearancePric
clearancePriceUnit,
clearanceVolumeUnit,
specialDictType,
transportPrice,
transportPriceUnit,
transportVolumeUnit, */
})
}
},
......@@ -281,36 +248,30 @@ export default {
},
async created() {
// 修改回显
if (this.$route.query.id) {
getProductPrice(12).then(res => {
this.form = res.data
this.product = res.data.productDO
/* getProduct(res.data.productId).then(res => {
this.product = res.data
}) */
})
if (this.$route.query.ids) {
let query = {
ids: this.$route.query.id
ids: this.$route.query.ids
}
getProductPriceList(query).then(res => {
this.form = res.data[0]
this.form = {
productId: res.data[0].productId,
productType: res.data[0].productType,
specialList: res.data[0].specialList,
advanceStatus: res.data[0].advanceStatus,
needBook: res.data[0].needBook,
dayLimit: res.data[0].dayLimit,
containerLocation: res.data[0].containerLocation,
square: res.data[0].square
}
this.lineList = res.data
})
// this.form =newdata[newdata.length-1]
// this.product = newdata[newdata.length-1].productDO
}
// 指定产品
/* // 指定产品
else if (this.$route.query.product_id) {
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
})
}
} */
// 获取类型列表
else {
this.productDisabled = false
......@@ -333,7 +294,6 @@ export default {
})
},
methods: {
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
......@@ -341,28 +301,42 @@ export default {
}
// 只有新增的时候做判断
if (!this.form.id && (!this.selectedRoutes || !this.selectedRoutes.length)) {
if (!this.$route.query.ids && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路');
return;
}
let data = Object.assign({}, this.form, {
lineChannelList: this.selectedRoutes,
// lineChannelList: this.selectedRoutes,
specialList: this.specialProducts
})
// 修改的提交
if (this.form.id != null) {
if (this.lineList.length > 1) {//批量修改
batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price')
})
} else {
updateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price')
if (this.$route.query.ids) {
if(this.lineList.length == 1){
data.lineChannelList = {
lineId: this.lineList[0].warehouseLineId,
shippingChannelId: this.lineList[0].shippingChannelId || 0
}
}else{
data.lineChannelList = []
this.lineList.forEach(item => {
console.log(item.id, this.checkList.indexOf(item.id) > -1)
if(this.checkList.indexOf(item.id) > -1){
data.lineChannelList.push({
lineId: item.warehouseLineId,
shippingChannelId: item.shippingChannelId || 0
}
)
}
})
}
if(data.lineChannelList.length < 1){
return this.$message.error('请选择需要修改的路线')
}
batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price')
})
return;
}
......
......@@ -63,7 +63,7 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:product-price:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="multiple" v-hasPermi="['ecw:product:attr']">批量设置路线</el-button>
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit" :disabled="multiple" v-hasPermi="['ecw:product:attr']">批量设置路线</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
......@@ -78,31 +78,31 @@
<el-table-column label="序号" prop="id" width="50" />
<el-table-column label="商品编码" align="center" prop="productCode" >
<template slot-scope="scope">
<template slot-scope="{row}">
<div>
{{ scope.row.productDO.productCode }}
{{ row.productDO ? row.productDO.productCode : '无productDO字段' }}
</div>
</template>
</el-table-column>
<el-table-column label="海关编码" align="center" prop="customsCode" >
<template slot-scope="scope">
<template slot-scope="{row}">
<div>
{{ scope.row.productDO.customsCode }}
{{ row.productDO ? row.productDO.customsCode : '无productDO字段' }}
</div>
</template>
</el-table-column>
<el-table-column label="商品类型" align="center" prop="typeId">
<template slot-scope="scope">
<span>{{ getTypeName(scope.row.productDO.typeId) }}</span>
<template slot-scope="{row}">
<span>{{ row.productDO ? getTypeName(row.productDO.typeId) : '无productDO字段' }}</span>
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" prop="productName" >
<template slot-scope="scope">
<template slot-scope="{row}">
<div>
{{ scope.row.productDO.titleZh }}
{{ row.productDO ? row.productDO.titleZh : '无productDO字段' }}
</div>
</template>
</el-table-column>
......@@ -547,12 +547,12 @@ export default {
},
// 批量设置路线
handleEdit() {
this.$router.push('product-price/edit?id=' + this.ids)
handleBatchEdit() {
this.$router.push('../../lineProject/product-price/edit?ids=' + this.ids)
},
/** 修改按钮操作 */
handleUpdate(row) {
return this.$router.push('../../lineProject/product-price/edit?id=' + row.id)
return this.$router.push('../../lineProject/product-price/edit?ids=' + row.id)
},
updateStatus(row, type) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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