|
|
|
@ -157,8 +157,17 @@
|
|
|
|
|
<el-text @click="handleView(slotProps.scope)"> 查看 </el-text> |
|
|
|
|
<el-text @click="handleCallDeliveryOwn(slotProps.scope)"> 修改客户信息 </el-text> |
|
|
|
|
<el-text @click="handleGoLogs(slotProps.scope)"> 日志 </el-text> |
|
|
|
|
<el-text @click="Splittheorder(slotProps.scope.row)" v-if="slotProps.scope.row.isZero ==0 && permissionList.distributionStockList_unpack"> 拆单 </el-text> |
|
|
|
|
<el-text @click="zeroSplittheorder(slotProps.scope.row)" v-if="slotProps.scope.row.isZero ==1" >零担拆单</el-text> |
|
|
|
|
<el-text |
|
|
|
|
@click="Splittheorder(slotProps.scope.row)" |
|
|
|
|
v-if="slotProps.scope.row.isZero == 0 && permissionList.distributionStockList_unpack" |
|
|
|
|
> |
|
|
|
|
拆单 |
|
|
|
|
</el-text> |
|
|
|
|
<el-text |
|
|
|
|
@click="zeroSplittheorder(slotProps.scope.row)" |
|
|
|
|
v-if="slotProps.scope.row.isZero == 1" |
|
|
|
|
>零担拆单</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
@ -406,183 +415,176 @@
|
|
|
|
|
</div> |
|
|
|
|
<!-- 零担拆单 --> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="zerodialogTableVisible" |
|
|
|
|
width="65%" |
|
|
|
|
title="运单信息" |
|
|
|
|
:show-close="false" |
|
|
|
|
:lock-scroll="false" |
|
|
|
|
:align-center="true" |
|
|
|
|
> |
|
|
|
|
<div class="topbox"> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>运单号</div> |
|
|
|
|
<div>{{ rowobj.waybillNumber }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>品牌</div> |
|
|
|
|
<div>{{ rowobj.brand }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>发货单位</div> |
|
|
|
|
<div>{{ rowobj.shipper }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>发货人</div> |
|
|
|
|
<div>{{ rowobj.shipperName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>发货方电话</div> |
|
|
|
|
<div>{{ rowobj.shipperMobile }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>发货方地址</div> |
|
|
|
|
<div>{{ rowobj.shipperAddress }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>收货单位</div> |
|
|
|
|
<div>{{ rowobj.consignee }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>收货人</div> |
|
|
|
|
<div>{{ rowobj.consigneeName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>收货电话</div> |
|
|
|
|
<div>{{ rowobj.consigneeMobile }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>收货地址</div> |
|
|
|
|
<div>{{ rowobj.consigneeAddress }}</div> |
|
|
|
|
v-model="zerodialogTableVisible" |
|
|
|
|
width="65%" |
|
|
|
|
title="运单信息" |
|
|
|
|
:show-close="false" |
|
|
|
|
:lock-scroll="false" |
|
|
|
|
:align-center="true" |
|
|
|
|
> |
|
|
|
|
<div class="topbox"> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>运单号</div> |
|
|
|
|
<div>{{ rowobj.waybillNumber }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>品牌</div> |
|
|
|
|
<div>{{ rowobj.brand }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>发货单位</div> |
|
|
|
|
<div>{{ rowobj.shipper }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>发货人</div> |
|
|
|
|
<div>{{ rowobj.shipperName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>发货方电话</div> |
|
|
|
|
<div>{{ rowobj.shipperMobile }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>运单总件数</div> |
|
|
|
|
<div>{{ rowobj.totalCount }}</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>发货方地址</div> |
|
|
|
|
<div>{{ rowobj.shipperAddress }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>货物类型</div> |
|
|
|
|
<div>{{ rowobj.goodsName }}</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>收货单位</div> |
|
|
|
|
<div>{{ rowobj.consignee }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>收货人</div> |
|
|
|
|
<div>{{ rowobj.consigneeName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>收货电话</div> |
|
|
|
|
<div>{{ rowobj.consigneeMobile }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>订单总件数</div> |
|
|
|
|
<div>{{ rowobj.totalNumber }}</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>收货地址</div> |
|
|
|
|
<div>{{ rowobj.consigneeAddress }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div></div> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>运单总件数</div> |
|
|
|
|
<div>{{ rowobj.totalCount }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="titlxbx"> |
|
|
|
|
<div> |
|
|
|
|
<div>货物类型</div> |
|
|
|
|
<div>{{ rowobj.goodsName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div>订单总件数</div> |
|
|
|
|
<div>{{ rowobj.totalNumber }}</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<div>剩余件数</div> |
|
|
|
|
<div>{{ rowobj.handQuantity }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="maxitembxlist" v-loading="zeroload" |
|
|
|
|
element-loading-text="Loading..."> |
|
|
|
|
<div class="items" v-for="(item, index) in orderlist" :key="item"> |
|
|
|
|
<div class="titltophead"> |
|
|
|
|
<div>订单{{ index + 1 }}</div> |
|
|
|
|
<div> |
|
|
|
|
<el-icon class="icons" @click="addorder"><CirclePlusFilled /></el-icon> |
|
|
|
|
<el-icon v-if="orderlist.length > 1" class="icons" @click="rmvorder(index)" |
|
|
|
|
><RemoveFilled |
|
|
|
|
/></el-icon> |
|
|
|
|
<div>剩余件数</div> |
|
|
|
|
<div>{{ rowobj.handQuantity }}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="contbx"> |
|
|
|
|
<div class="tabitem"> |
|
|
|
|
<div>货物名称</div> |
|
|
|
|
|
|
|
|
|
<div>可用件数</div> |
|
|
|
|
<div>分配数量</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="contentitem" v-for="itemlimit in item.goods" :key="itemlimit"> |
|
|
|
|
</div> |
|
|
|
|
<div class="maxitembxlist" v-loading="zeroload" element-loading-text="Loading..."> |
|
|
|
|
<div class="items" v-for="(item, index) in orderlist" :key="item"> |
|
|
|
|
<div class="titltophead"> |
|
|
|
|
<div>订单{{ index + 1 }}</div> |
|
|
|
|
<div> |
|
|
|
|
{{ itemlimit.productName }} |
|
|
|
|
</div> |
|
|
|
|
<div class="numbinput"> |
|
|
|
|
<el-input-number |
|
|
|
|
class="w100" |
|
|
|
|
v-model="itemlimit.quantity" |
|
|
|
|
disabled |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<div class="numbinput"> |
|
|
|
|
<el-input-number |
|
|
|
|
class="w100" |
|
|
|
|
:min="0" |
|
|
|
|
:max="itemlimit.quantity" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
v-model="itemlimit.splitNum" |
|
|
|
|
:controls="false" |
|
|
|
|
:precision="0" |
|
|
|
|
placeholder="请输入数量" |
|
|
|
|
/> |
|
|
|
|
<el-icon class="icons" @click="addorder"><CirclePlusFilled /></el-icon> |
|
|
|
|
<el-icon v-if="orderlist.length > 1" class="icons" @click="rmvorder(index)" |
|
|
|
|
><RemoveFilled |
|
|
|
|
/></el-icon> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="editinput"> |
|
|
|
|
<div class="inputitem"> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.name" placeholder="请输入收货人" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="contbx"> |
|
|
|
|
<div class="tabitem"> |
|
|
|
|
<div>货物名称</div> |
|
|
|
|
|
|
|
|
|
<div>可用件数</div> |
|
|
|
|
<div>分配数量</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人电话:</span> |
|
|
|
|
<div class="contentitem" v-for="itemlimit in item.goods" :key="itemlimit"> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.phone" placeholder="请输入收货人电话" /> |
|
|
|
|
{{ itemlimit.productName }} |
|
|
|
|
</div> |
|
|
|
|
<div class="numbinput"> |
|
|
|
|
<el-input-number class="w100" v-model="itemlimit.quantity" disabled /> |
|
|
|
|
</div> |
|
|
|
|
<div class="numbinput"> |
|
|
|
|
<el-input-number |
|
|
|
|
class="w100" |
|
|
|
|
:min="0" |
|
|
|
|
:max="itemlimit.quantity" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
v-model="itemlimit.splitNum" |
|
|
|
|
:controls="false" |
|
|
|
|
:precision="0" |
|
|
|
|
placeholder="请输入数量" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inputitem"> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人地址:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.addres" placeholder="请输入收货人地址" /> |
|
|
|
|
<div class="editinput"> |
|
|
|
|
<div class="inputitem"> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.name" placeholder="请输入收货人" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人电话:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.phone" placeholder="请输入收货人电话" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>备注:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.rak" type="textarea" placeholder="请输入备注" /> |
|
|
|
|
<div class="inputitem"> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>收货人地址:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.addres" placeholder="请输入收货人地址" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="inpts"> |
|
|
|
|
<span>备注:</span> |
|
|
|
|
<div> |
|
|
|
|
<el-input v-model="item.rak" type="textarea" placeholder="请输入备注" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="btsbx"> |
|
|
|
|
<el-button @click="zerodialogTableVisible=false">取消</el-button> |
|
|
|
|
<el-button :disabled="zeroload" type="primary" @click="hidedial">确认</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
<div class="btsbx"> |
|
|
|
|
<el-button @click="zerodialogTableVisible = false">取消</el-button> |
|
|
|
|
<el-button :disabled="zeroload" type="primary" @click="hidedial">确认</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 拆单弹窗 --> |
|
|
|
|
<el-dialog v-model="dialogSplitthe" title="新增拆单任务"> |
|
|
|
|
<el-button type="primary" @click="newadd">新增</el-button> |
|
|
|
@ -689,7 +691,7 @@ import { getDictionaryBiz } from '@/api/system/dict';
|
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls, getObjType, handleClearTableQuery,isNumber } from '@/utils/util'; |
|
|
|
|
import { downloadXls, getObjType, handleClearTableQuery, isNumber } from '@/utils/util'; |
|
|
|
|
import { columnList } from '@/option/distribution/distributionStockArticleSelf'; |
|
|
|
|
import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js'; |
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'; |
|
|
|
@ -701,9 +703,9 @@ export default {
|
|
|
|
|
excelForm: {}, |
|
|
|
|
excelBox: false, |
|
|
|
|
tcloading: false, |
|
|
|
|
rowobj:{}, |
|
|
|
|
zeroload:false, |
|
|
|
|
parcelList:[], |
|
|
|
|
rowobj: {}, |
|
|
|
|
zeroload: false, |
|
|
|
|
parcelList: [], |
|
|
|
|
orderobj: { |
|
|
|
|
name: '', |
|
|
|
|
phone: '', |
|
|
|
@ -730,7 +732,7 @@ export default {
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
zerodialogTableVisible:false, |
|
|
|
|
zerodialogTableVisible: false, |
|
|
|
|
Totalnumbersplitorders: 0, |
|
|
|
|
dataRwo: {}, |
|
|
|
|
ruleForm: { |
|
|
|
@ -896,13 +898,16 @@ export default {
|
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
console.log(this.permission,'this.permission'); |
|
|
|
|
console.log(this.permission, 'this.permission'); |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.basicdataBrandCategory_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.basicdataBrandCategory_view, false), |
|
|
|
|
delBtn: this.validData(this.permission.basicdataBrandCategory_delete, false), |
|
|
|
|
editBtn: this.validData(this.permission.basicdataBrandCategory_edit, false), |
|
|
|
|
distributionStockList_unpack: this.validData(this.permission.distributionStockList_unpack, false), |
|
|
|
|
distributionStockList_unpack: this.validData( |
|
|
|
|
this.permission.distributionStockList_unpack, |
|
|
|
|
false |
|
|
|
|
), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
ids() { |
|
|
|
@ -1458,17 +1463,17 @@ export default {
|
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.Splittheform.PackageList=[ |
|
|
|
|
{ |
|
|
|
|
stockArticleId: '', //被拆订单ID |
|
|
|
|
orderCode: '', //被拆订单 |
|
|
|
|
mallName: '', //商场名称 |
|
|
|
|
taskNumber: '', //任务拆单数量 |
|
|
|
|
customerName: '', //新的客户姓名 |
|
|
|
|
customerTelephone: '', //新的客户联系方式 |
|
|
|
|
customerAddress: '', //新的客户地址 |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
this.Splittheform.PackageList = [ |
|
|
|
|
{ |
|
|
|
|
stockArticleId: '', //被拆订单ID |
|
|
|
|
orderCode: '', //被拆订单 |
|
|
|
|
mallName: '', //商场名称 |
|
|
|
|
taskNumber: '', //任务拆单数量 |
|
|
|
|
customerName: '', //新的客户姓名 |
|
|
|
|
customerTelephone: '', //新的客户联系方式 |
|
|
|
|
customerAddress: '', //新的客户地址 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.dialogSplitthe = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1481,40 +1486,40 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 零担拆单 |
|
|
|
|
async zeroSplittheorder(row){ |
|
|
|
|
async zeroSplittheorder(row) { |
|
|
|
|
console.log(row); |
|
|
|
|
|
|
|
|
|
this.zerodialogTableVisible=true |
|
|
|
|
let _data={ |
|
|
|
|
orderId:row.id |
|
|
|
|
} |
|
|
|
|
let res= await $_zeroetail(_data) |
|
|
|
|
console.log(res,'res'); |
|
|
|
|
const {code , data } = res.data |
|
|
|
|
if(code !=200){ |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
let _obj ={ |
|
|
|
|
...data.orderInfo,...data.waybillEntity |
|
|
|
|
|
|
|
|
|
this.zerodialogTableVisible = true; |
|
|
|
|
let _data = { |
|
|
|
|
orderId: row.id, |
|
|
|
|
}; |
|
|
|
|
let res = await $_zeroetail(_data); |
|
|
|
|
console.log(res, 'res'); |
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code != 200) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(data.orderInfo,'data.orderInfo'); |
|
|
|
|
|
|
|
|
|
console.log(data.waybillEntity,'data.waybillEntity'); |
|
|
|
|
|
|
|
|
|
console.log( _obj,' _obj'); |
|
|
|
|
|
|
|
|
|
let Name = data.parcelList.map(res=>res.firsts).join(',') |
|
|
|
|
this.rowobj=_obj |
|
|
|
|
let _obj = { |
|
|
|
|
...data.orderInfo, |
|
|
|
|
...data.waybillEntity, |
|
|
|
|
}; |
|
|
|
|
console.log(data.orderInfo, 'data.orderInfo'); |
|
|
|
|
|
|
|
|
|
console.log(data.waybillEntity, 'data.waybillEntity'); |
|
|
|
|
|
|
|
|
|
console.log(_obj, ' _obj'); |
|
|
|
|
|
|
|
|
|
let Name = data.parcelList.map(res => res.firsts).join(','); |
|
|
|
|
this.rowobj = _obj; |
|
|
|
|
this.orderlist.splice(1); |
|
|
|
|
this.parcelList=data.parcelList; |
|
|
|
|
|
|
|
|
|
// 使用数组来批量设置属性 |
|
|
|
|
['addres', 'name', 'phone', 'rak'].forEach(prop => { |
|
|
|
|
this.orderlist[0][prop] = ''; |
|
|
|
|
}); |
|
|
|
|
this.orderlist[0].goods = this.splitName(Name,data.parcelList); |
|
|
|
|
console.log(this.orderlist[0],'this.orderlist[0]'); |
|
|
|
|
|
|
|
|
|
this.parcelList = data.parcelList; |
|
|
|
|
|
|
|
|
|
// 使用数组来批量设置属性 |
|
|
|
|
['addres', 'name', 'phone', 'rak'].forEach(prop => { |
|
|
|
|
this.orderlist[0][prop] = ''; |
|
|
|
|
}); |
|
|
|
|
this.orderlist[0].goods = this.splitName(Name, data.parcelList); |
|
|
|
|
console.log(this.orderlist[0], 'this.orderlist[0]'); |
|
|
|
|
}, |
|
|
|
|
addorder() { |
|
|
|
|
// 实现对对象内包含的元素进行copy |
|
|
|
@ -1522,17 +1527,17 @@ export default {
|
|
|
|
|
obsj.goods = this.splitName(this.rowobj.goodsName, this.parcelList); |
|
|
|
|
this.orderlist.push(obsj); |
|
|
|
|
}, |
|
|
|
|
splitName(goodName,data) { |
|
|
|
|
console.log(goodName,'goodName'); |
|
|
|
|
|
|
|
|
|
splitName(goodName, data) { |
|
|
|
|
console.log(goodName, 'goodName'); |
|
|
|
|
|
|
|
|
|
var t = goodName.split(','); |
|
|
|
|
var arr = []; |
|
|
|
|
for (let i = 0; i < t.length; i++) { |
|
|
|
|
var proN = t[i]; |
|
|
|
|
var o = {}; |
|
|
|
|
var o = {}; |
|
|
|
|
o.productName = proN; |
|
|
|
|
o.splitNum = 0; |
|
|
|
|
o.quantity=data[i].quantity; |
|
|
|
|
o.quantity = data[i].quantity; |
|
|
|
|
arr[i] = o; |
|
|
|
|
} |
|
|
|
|
return arr; |
|
|
|
@ -1545,7 +1550,7 @@ export default {
|
|
|
|
|
this.orderlist.splice(index, 1); |
|
|
|
|
}, |
|
|
|
|
async hidedial() { |
|
|
|
|
this.zeroload=true |
|
|
|
|
this.zeroload = true; |
|
|
|
|
try { |
|
|
|
|
let _arr = []; |
|
|
|
|
let totalNum = 0; |
|
|
|
@ -1556,7 +1561,7 @@ export default {
|
|
|
|
|
let _flag = false; |
|
|
|
|
for (let i = 0; i < value.goods.length; i++) { |
|
|
|
|
const item = value.goods[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('item :>> ', item); |
|
|
|
|
if (isNumber(item.splitNum) && item.splitNum > 0) _flag = true; |
|
|
|
|
totalNum += item.splitNum; |
|
|
|
@ -1572,15 +1577,15 @@ export default {
|
|
|
|
|
}; |
|
|
|
|
_arr.push(obj); |
|
|
|
|
} |
|
|
|
|
console.log(this.rowobj,'this.rowobj'); |
|
|
|
|
|
|
|
|
|
console.log(this.rowobj, 'this.rowobj'); |
|
|
|
|
|
|
|
|
|
console.log('_arr :>> ', _arr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_arr.length === 0) return this.$message.error('请选择需要拆单的数据'); |
|
|
|
|
if (totalNum > this.rowobj.handQuantity) return this.$message.error('总数大于可用数量'); |
|
|
|
|
this.dialogTableVisible = false; |
|
|
|
|
console.log(_arr); |
|
|
|
|
this.zeroload=true |
|
|
|
|
this.zeroload = true; |
|
|
|
|
const res = await $_splitOrder(_arr); |
|
|
|
|
|
|
|
|
|
const { code, data } = res.data; |
|
|
|
@ -1590,7 +1595,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.zerodialogTableVisible=false |
|
|
|
|
this.zerodialogTableVisible = false; |
|
|
|
|
// splitOrder(row).then(res => { |
|
|
|
|
// const data = res.data.data; |
|
|
|
|
// this.page.total = data.total; |
|
|
|
@ -1603,11 +1608,10 @@ export default {
|
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
|
this.zeroload=false |
|
|
|
|
this.zeroload = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 拆单总数统计 |
|
|
|
|
changeTaskNumber() { |
|
|
|
|
this.Totalnumbersplitorders = this.Splittheform.PackageList.reduce( |
|
|
|
@ -1647,12 +1651,11 @@ export default {
|
|
|
|
|
let taskNumberState = this.Splittheform.PackageList.find(item => item.taskNumber == 0); |
|
|
|
|
if (taskNumberState) { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '存在拆单数量能为0的任务', |
|
|
|
|
message: '存在拆单数量为0的任务', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(this.Splittheform.PackageList); |
|
|
|
|
let sum = this.Splittheform.PackageList.reduce((accumulator, currentValue) => { |
|
|
|
|
if (!currentValue || currentValue.taskNumber == null) { |
|
|
|
|
return accumulator; |
|
|
|
@ -1693,9 +1696,9 @@ export default {
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.dialogSplitthe = false; |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}) |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -1707,6 +1710,11 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
} else { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '信息未填写完整或填写格式不正确!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -1921,9 +1929,8 @@ export default {
|
|
|
|
|
this.getAllOrderInfo(); |
|
|
|
|
const [res] = await Promise.all([ |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)), |
|
|
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
@ -2193,7 +2200,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.numbinput { |
|
|
|
|
.el-input-number{ |
|
|
|
|
.el-input-number { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2295,8 +2302,7 @@ export default {
|
|
|
|
|
input { |
|
|
|
|
font-size: 12px !important; |
|
|
|
|
} |
|
|
|
|
.el-input{ |
|
|
|
|
|
|
|
|
|
.el-input { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
textarea { |
|
|
|
|