Commit cc3130cc authored by 我在何方's avatar 我在何方
parents fe3238dc bd296531
......@@ -684,3 +684,38 @@ export function splitCancelApply(data){
data
})
}
// 撤销拆单
export function orderSplitRevoke(data){
return request({
url: '/order/split/revoke',
method: 'put',
data
})
}
/*根据订单ID获取撤销拆单详情*/
export function splitRevoke(orderId){
return request({
url: '/order/split/revoke/' + orderId,
method: 'get'
})
}
/*根据审批ID获取撤销拆单详情*/
export function splitRevokeApply(approvalId){
return request({
url: '/order/split/revoke/apply/' + approvalId,
method: 'get'
})
}
/*取消撤销拆单*/
export function cancelSplitRevoke(data){
return request({
url: '/order/split/cancel/revoke',
method: 'put',
data
})
}
......@@ -14,7 +14,7 @@
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="item['title' + lang]"
:label="item['title' + lang] + (item.auditStatus === 2 ? '' : `(${$t('审核中')})`)"
:value="index">
</el-option>
</el-select>
......
......@@ -386,6 +386,11 @@ export default {
component: ()=>import('@/views/ecw/financial/components/commissionPaymentDetails.vue'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
/*撤销拆单*/
split_revoke:{
component: () => import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey
}
}
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
......
<template>
<el-dialog :visible="true" title="撤销拆单" :before-close="close">
<el-form :model="form" label-width="100px">
<!--<el-form-item label="申请理由">
<el-input v-model="form.reason"></el-input>
</el-form-item>-->
<el-form-item label="抄送">
<work-flow v-model="form.ccIds" xmlkey="revoke_split_order"></work-flow>
</el-form-item>
</el-form>
<div slot="footer">
<template v-if="formId" >
<el-button type="primary" @click="toBpmDetail">审核中</el-button>
<el-button type="default" @click="cancelApproval">取消审核</el-button>
</template>
<el-button v-else type="primary" @click="submit" :loading="submitting" :disabled="submitting">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import WorkFlow from "@/components/WorkFlow";
import {cancelSplitRevoke, orderSplitRevoke, splitRevoke} from '@/api/ecw/order'
export default {
name: "SplitRevoke",
components: { WorkFlow},
props:{
orderId: Number
},
data(){
return {
formId: null, // 审批ID
submitting: false,
form: {
ccIds: []
}
}
},
created() {
splitRevoke(this.orderId).then(res =>{
console.log(res)
if(res.data.formId){
this.formId = res.data.formId
}
})
},
methods:{
submit(){
console.log('提交')
if(this.submitting) return
this.submitting = true
orderSplitRevoke({
orderId: this.orderId,
copyUserId: this.form.ccIds
}).then(res => {
this.$message.success(res.msg || '操作成功')
this.close()
}).finally(() =>{
this.submitting = false
})
},
close(){
this.$emit('close')
},
toBpmDetail(){
this.$router.push(`/bpm/process-instance/detail?id=${this.formId}`)
this.close()
},
// 取消审核
cancelApproval(){
this.$prompt(this.$t("请输入取消原因")).then(res => {
return cancelSplitRevoke({orderId: this.orderId, reason: res.value})
}).then(res => {
this.$message.success(res.msg || this.$t('操作成功'))
this.close()
})
}
}
}
</script>
<style scoped>
</style>
<!--拆单审核中的申请信息部分-->
<template>
<div v-if="orders">
<el-table :data="orders">
<el-table-column :label="$t('订单编号')">
<template slot-scope="scope">{{scope.row.orderNo}}</template>
</el-table-column>
<el-table-column :label="$t('唛头')">
<template slot-scope="{row}">{{row.marks}}</template>
</el-table-column>
<el-table-column label="订单状态">
<template slot-scope="{row}">{{row.statusMsg}}</template>
</el-table-column>
<el-table-column :label="$t('填单统计')">
<template slot-scope="{row}">
{{row.costVO.totalNum}}{{$t('')}}<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓统计')">
<template slot-scope="{row}">
{{row.sumNum}}{{$t('')}}<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓时间')">
<template slot-scope="{row}">
{{row.rucangTime|parseTime}}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
</template>
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
{{getChannelName(row.channelId)}}
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')">
<template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
</el-table-column>
<el-table-column :label="$t('目的仓')">
<template slot-scope="{row}">
{{jsonParse(row.objectiveVO.objective).titleZh}}
</template>
</el-table-column>
<el-table-column :label="$t('发货人')">
<template slot-scope="{row}">
{{row.consignorVO.name}}
</template>
</el-table-column>
<el-table-column :label="$t('收货人')">
<template slot-scope="{row}">
{{row.consigneeVO.name}}
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {getApproval, getOrder, splitRevokeApply} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default {
name: 'SplitRevokeDetail',
filters: {parseTime},
props:{
id: [String, Number]
},
data(){
return {
orders: null,
channels: []
}
},
watch:{
id(){
this.getData()
}
},
computed:{
jsonParse(){
return d => {
return JSON.parse(d)
}
},
getChannelName(){
return id => {
let channel = this.channels.find(item => item.channelId == id)
return channel ? channel.nameZh : '/'
}
}
},
created(){
if(this.id){
this.getData()
}
},
methods:{
getData(){
splitRevokeApply(this.id).then(res => {
this.orders = res.data.childrenOrderList
this.getChannels()
})
},
getChannels(){
let ids = []
this.orders.forEach(order => {
if(order.channelId){
ids.push(order.channelId)
}
})
if(!ids.length) return false
getChannelListByIds({ids: ids.join(',')}).then(res => {
this.channels = res.data
})
}
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
......@@ -317,8 +317,8 @@
</template>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
<template v-if="scope.row.parentOrderId">
<el-dropdown-item @click.native="cancelSplit(scope.row)" v-hasPermi="['ecw:order:cancel_split']">{{$t('撤销拆单')}}</el-dropdown-item>
<template v-if="scope.row.parentOrderId && scope.row.status < 11">
<el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{$t('撤销拆单')}}</el-dropdown-item>
</template>
......@@ -462,6 +462,7 @@
<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" @delete="getList" />
<SplitRevoke v-if="splitRevokeOrderId" :order-id="splitRevokeOrderId" @close="splitRevokeOrderId=null;getList()"></SplitRevoke>
</div>
</template>
......@@ -471,7 +472,6 @@ import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { getTradeCityList } from '@/api/ecw/region'
import {
createOrder,
updateOrder,
......@@ -497,7 +497,7 @@ import {
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload, splitCancelApply
exportUnload, splitCancelApply, orderSplitRevoke
} from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
......@@ -512,6 +512,7 @@ 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";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
export default {
name: "EcwOrderIndex",
components: {
......@@ -520,6 +521,7 @@ export default {
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
props: {
......@@ -583,6 +585,8 @@ export default {
},
currencyList:[],
statistics: null ,// 统计数据
splitRevokeOrderId: null, // 撤销拆单的订单ID
};
},
watch:{
......@@ -646,7 +650,7 @@ export default {
}
},
activated(){
this.handleQuery()
this.getList()
},
created() {
this.getTransportFromRoute()
......@@ -659,13 +663,8 @@ export default {
},
methods: {
// 取消拆单申请
cancelSplit(row){
this.$prompt('请输入撤销理由').then(res =>{
console.log("res", res)
return splitCancelApply({ orderId: row.orderId, reason: res.value})
}).then(() => {
this.getList()
})
splitRevoke(row){
this.splitRevokeOrderId = row.orderId
},
// 获得导出函数
getExportFunc(){
......
This diff is collapsed.
......@@ -12,8 +12,11 @@
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange"/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
<span style="min-width: 200px;margin-right: 15px;display: inline-block">
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange"/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</span>
<el-button v-if="!order.parentOrderId && !isAdd" type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
......@@ -171,6 +174,19 @@
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
......@@ -185,6 +201,7 @@
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/>
<el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
......@@ -352,6 +369,18 @@
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
......@@ -380,6 +409,35 @@
</template>
</span>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -391,6 +449,9 @@ import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {createProduct} from "@/api/ecw/product"
export default {
name: "Warehouse",
......@@ -441,6 +502,11 @@ export default {
}
},
mounted() {
this.getAttrList()
this.getTypeList()
},
computed: {
isAdd() {
return this.$route.path === "/order/warehousing-add"
......@@ -581,7 +647,26 @@ export default {
formId: '',
// 追加时被保护的行数
protectRowCount: -1
protectRowCount: -1,
// 添加商品弹窗
isShowProduct: false,
productForm: {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
},
productRules: {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }],
},
//类型列表
typeList: [],
// 特性列表
attrList: []
}
},
......@@ -797,6 +882,13 @@ export default {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
......@@ -821,6 +913,46 @@ export default {
specificationType: '1',
table: []
})
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
/** 获取产品类型列表 */
getTypeList() {
getProductTypeList().then(response => {
this.typeList = response.data;
})
},
productSubmit(){
this.$refs["productForm"].validate(valid => {
if (!valid) {
return;
}
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交
createProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') {
this.form.prodId = response.data
} else {
this.form1.prodId = response.data
}
this.productCancel()
})
})
},
productCancel(){
this.isShowProduct = false
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
}
......
......@@ -90,7 +90,6 @@
:title="$t('修改')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>-->
<template v-else-if="
wareItem(row.orderItemId)
&& wareItem(row.orderItemId).orderWarehouseInBackItemDoList
......@@ -103,7 +102,6 @@
:title="$t('追加')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>-->
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
<!-- </template>-->
</template>
......@@ -114,7 +112,6 @@
:title="$t('入仓')"
:order="order"
@close="getList"></warehouse>
<!-- <el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>-->
</template>
</el-table-column>
</el-table>
......@@ -179,8 +176,6 @@
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
:order-id="orderId" :warehouse-id="warehouseId" :is-editing="isEdit"></warehouse-area-dialog>
<edit-dialog :order="order" :title="title" :order-id="order.orderId" :visible.sync="warehousingVisible" :warehousing="warehousing" :edit="isEdit" :is-jiyun="order.type === 1 || order.type === '1'"></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
:title="$t('确认入仓')"
......@@ -231,7 +226,6 @@ import {
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
import {DICT_TYPE} from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
......@@ -245,7 +239,6 @@ export default {
components: {
orderBaseInfo,
WarehouseAreaDialog,
editDialog,
PrintTag,
PrintWarehouseReceipt,
imageUpload,
......@@ -477,11 +470,6 @@ export default {
}
})
},
handleWarehousing(row) {
let wareItem = this.orderItemList.find(item => item.orderItemId == row.orderItemId) || {}
this.warehousing = {...row, ...wareItem}
this.warehousingVisible = true
},
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
......@@ -507,12 +495,6 @@ export default {
},
watch: {
warehousingVisible(val) {
if (!val){
this.getOrder()
this.getOrderItemList()
}
},
orderSpecialNeeds(val){
val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push({
......
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