|
|
@@ -90,15 +90,56 @@
|
|
|
<avue-crud :option="option" :data="form.preContainersList" id="out-table" ref="crud"
|
|
|
@selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 388)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-plus" :disabled="editDisabled"
|
|
|
+ @click="addRow">新 增
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="cntrTypeCode" slot-scope="{ row }">
|
|
|
+ <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.cntrTypeCode" placeholder="箱型" key="id"
|
|
|
+ res="records" label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName"></dic-select>
|
|
|
+ <span v-else>{{ row.cntrTypeCode }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="boxNo" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit && !row.srcId" v-model="row.boxNo" placeholder="请输入内容"
|
|
|
+ size="small"></el-input>
|
|
|
+ <span v-else>{{ row.boxNo }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="goodsName" slot-scope="{ row }">
|
|
|
+ <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsName" placeholder="品名" key="id"
|
|
|
+ res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="rowDicChange('goodsName', $event, row)"></dic-select>
|
|
|
+ <span v-else>{{ row.goodsName }}</span>
|
|
|
+ </template>
|
|
|
+ <tempalte slot="goodsType" slot-scope="{ row }">
|
|
|
+ <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
|
|
|
+ :filterable="true"></dic-select>
|
|
|
+ <span v-else>{{ row.goodsType }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="quantity" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.quantity" :controls="false"
|
|
|
+ placeholder="请输入 件数" size="small" style="width: 100%;"></el-input-number>
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="grossWeight" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.grossWeight" :controls="false"
|
|
|
+ placeholder="请输入 重量" size="small" style="width: 100%;"></el-input-number>
|
|
|
+ <span v-else>{{ row.grossWeight }}</span>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="price" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.price" :controls="false"
|
|
|
+ placeholder="请输入 单价" size="small" style="width: 100%;"></el-input-number>
|
|
|
+ <span v-else>{{ row.price }}</span>
|
|
|
+ </tempalte>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
@click="rowCell('箱编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
- @click="rowCell('派车', row, index)">派
|
|
|
- 车</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
- @click="rowCell('自提', row, index)">自
|
|
|
- 提</el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.type == 2"
|
|
|
+ @click="rowCell('派车', row, index)">{{ row.type == 1 ? '撤销派车' : '派车' }}</el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.type == 1"
|
|
|
+ @click="rowCell('自提', row, index)">{{ row.type == 2 ? '撤销自提' : '自 提' }}</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
@@ -137,13 +178,17 @@
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text"
|
|
|
:disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
|
|
|
- @click="rowCell('派车编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1||row.$cellEdit"
|
|
|
- @click="rowCell('确认派车', row, index)">确
|
|
|
- 认</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherWarehouseEntry == 1||row.$cellEdit"
|
|
|
- @click="rowCell('生成入库', row, index)">入
|
|
|
- 库</el-button>
|
|
|
+ @click="rowCell('派车编辑', row, index)">
|
|
|
+ {{ row.$cellEdit ? '保 存' : '编 辑' }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="text"
|
|
|
+ :disabled="editDisabled || row.whetherWarehouseEntry == 1 || row.$cellEdit"
|
|
|
+ @click="rowCell('确认派车', row, index)">
|
|
|
+ {{ row.whetherDispatchVehicles == 1 ? '撤销确认' : '确 认' }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
|
|
|
+ @click="rowCell('生成入库', row, index)">{{ row.whetherWarehouseEntry == 1 ? '撤销入库' : '入 库'
|
|
|
+ }}</el-button>
|
|
|
<!-- <el-button size="small" type="text"
|
|
|
:disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
|
|
|
@click="rowCell('派车删除', row, index)">删 除</el-button> -->
|
|
|
@@ -162,13 +207,19 @@
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
- @click="rowCell('入库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1||row.$cellEdit"
|
|
|
- @click="rowCell('入库确认', row, index)">入库确认</el-button>
|
|
|
+ @click="rowCell('入库编辑', row, index)">
|
|
|
+ {{ row.$cellEdit ? '保 存' : '编 辑' }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="text"
|
|
|
+ :disabled="editDisabled || row.whetherInOutStorage == 1 || row.$cellEdit"
|
|
|
+ @click="rowCell('入库确认', row, index)">
|
|
|
+ {{ row.confirmDispatchVehicles == 1 ? '撤销确认' : '入库确认' }}
|
|
|
+ </el-button>
|
|
|
<el-button size="small" type="text"
|
|
|
- :disabled="editDisabled || (row.whetherInOutStorage == 1 && row.surplusQuantity == 0)||row.$cellEdit"
|
|
|
- @click="rowCell('生成出库', row, index)">出
|
|
|
- 库</el-button>
|
|
|
+ :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
|
|
|
+ @click="rowCell('生成出库', row, index)">
|
|
|
+ {{ row.whetherInOutStorage == 1 ? '撤销出库' : '出 库' }}
|
|
|
+ </el-button>
|
|
|
<!-- <el-button size="small" type="text"
|
|
|
:disabled="editDisabled || row.confirmDispatchVehicles == 1 || row.whetherInOutStorage == 1"
|
|
|
@click="rowCell('入库删除', row, index)">删 除</el-button> -->
|
|
|
@@ -182,8 +233,9 @@
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
@click="rowCell('出库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
- @click="rowCell('出库确认', row, index)">出库确认</el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled" @click="rowCell('出库确认', row, index)">{{
|
|
|
+ row.confirmDispatchVehicles ==
|
|
|
+ 1 ? '撤销确认' : '出库确认' }}</el-button>
|
|
|
<el-button size="small" type="text" :disabled="editDisabled" @click="rowCell('开票', row, index)">开
|
|
|
票</el-button>
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
@@ -208,7 +260,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2 } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
+import { submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -488,7 +540,7 @@ export default {
|
|
|
optionBack: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 120,
|
|
|
+ menuWidth: 160,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
@@ -519,6 +571,12 @@ export default {
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
+ label: "类型",
|
|
|
+ prop: "goodsType",
|
|
|
+ width: "120",
|
|
|
+ overHidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "件数",
|
|
|
prop: "quantity",
|
|
|
width: "120",
|
|
|
@@ -633,7 +691,7 @@ export default {
|
|
|
optionBack2: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 120,
|
|
|
+ menuWidth: 160,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
@@ -777,7 +835,7 @@ export default {
|
|
|
optionBack3: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 140,
|
|
|
+ menuWidth: 160,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
@@ -1062,6 +1120,33 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
},
|
|
|
+ addRow() {
|
|
|
+ if (!this.form.corpId) return this.$message.error("请选择客户名称");
|
|
|
+ this.form.preContainersList.push({ $cellEdit: true })
|
|
|
+ // if (this.form.agentItemsList.length == 0) {
|
|
|
+ // this.form.agentItemsList.push({ $cellEdit: true })
|
|
|
+ // } else {
|
|
|
+ // let obj = {}
|
|
|
+ // obj = this.deepClone(this.form.agentItemsList[this.form.agentItemsList.length - 1])
|
|
|
+ // this.form.agentItemsList.push({
|
|
|
+ // billNo: obj.billNo,
|
|
|
+ // boxType: obj.boxType,
|
|
|
+ // leadSealNo: obj.leadSealNo,
|
|
|
+ // orderReleaseMethod: obj.orderReleaseMethod,
|
|
|
+ // orderNo: obj.orderNo,
|
|
|
+ // hsCode: obj.hsCode,
|
|
|
+ // factoryNumber: obj.factoryNumber,
|
|
|
+ // labelProductName: obj.labelProductName,
|
|
|
+ // goodsType: obj.goodsType,
|
|
|
+ // quantity: obj.quantity,
|
|
|
+ // netWeight: obj.netWeight,
|
|
|
+ // price: obj.price,
|
|
|
+ // grossWeight: obj.grossWeight,
|
|
|
+ // amount: obj.amount,
|
|
|
+ // $cellEdit: true
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ },
|
|
|
dicChange(name, row) {
|
|
|
if (name == 'corpCnName') {
|
|
|
if (row) {
|
|
|
@@ -1131,6 +1216,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
rowDicChange(name, row, el) {
|
|
|
+ if (name == 'goodsName') {
|
|
|
+ if (row) {
|
|
|
+ el.hsCode = row.hsCode
|
|
|
+ } else {
|
|
|
+ el.hsCode = null
|
|
|
+ }
|
|
|
+ }
|
|
|
if (name == 'fleetName') {
|
|
|
if (row) {
|
|
|
el.fullName = row.mgrName
|
|
|
@@ -1237,37 +1329,67 @@ export default {
|
|
|
...row,
|
|
|
type: 1,
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
+ if (row.whetherDispatchVehicles == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokePrecontainers(obj).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ generateDispatchVehicles(obj).then(res => {
|
|
|
+ this.$message.success("派车成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- generateDispatchVehicles(obj).then(res => {
|
|
|
- this.$message.success("派车成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
}
|
|
|
if (name == '自提') {
|
|
|
let obj = {
|
|
|
...row,
|
|
|
type: 2,
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- generateDispatchVehicles(obj).then(res => {
|
|
|
- this.$message.success("自提成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
+ if (row.whetherDispatchVehicles == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokePrecontainers(obj).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ generateDispatchVehicles(obj).then(res => {
|
|
|
+ this.$message.success("自提成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
// if (name == '派车删除') {
|
|
|
// const loading = this.$loading({
|
|
|
@@ -1287,96 +1409,174 @@ export default {
|
|
|
if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
|
|
|
return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmDispatchVehicles(row).then(res => {
|
|
|
- this.$message.success("派车成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
+ if (row.whetherDispatchVehicles == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeDispatchVehicles(row).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log(row)
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ confirmDispatchVehicles(row).then(res => {
|
|
|
+ this.$message.success("派车成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (name == '生成入库') {
|
|
|
if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
|
|
|
return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- generateWarehouseEntry(row).then(res => {
|
|
|
- this.$message.success("生成入库成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
+ if (row.whetherWarehouseEntry == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeWarehouseEntry(row).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ generateWarehouseEntry(row).then(res => {
|
|
|
+ this.$message.success("生成入库成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (name == '入库确认') {
|
|
|
if (!this.form.eta || !row.warehouseName) {
|
|
|
return this.$message.error((!this.form.eta ? "基础信息的实际到港," : '') + (!row.warehouseName ? "仓库" : '') + "不能为空");
|
|
|
}
|
|
|
- calculationWarehouseUnitPrice(row).then(res => {
|
|
|
- this.$confirm(res.data.data, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmWarehouseEntry(row).then(res => {
|
|
|
- this.$message.success("入库成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
+ if (row.confirmDispatchVehicles == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeInoutstorage(row).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ calculationWarehouseUnitPrice(row).then(res => {
|
|
|
+ this.$confirm(res.data.data, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ confirmWarehouseEntry(row).then(res => {
|
|
|
+ this.$message.success("入库成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
if (name == '生成出库') {
|
|
|
if (!row.warehouseName || !row.warehouseUnitPrice) {
|
|
|
return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- generateOutbound(row).then(res => {
|
|
|
- this.$message.success("生成出库成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
+ if (row.whetherInOutStorage == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeOutbound(row).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ generateOutbound(row).then(res => {
|
|
|
+ this.$message.success("生成出库成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (name == '出库确认') {
|
|
|
if (!row.outQuantity || !row.outWeight) {
|
|
|
return this.$message.error((!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
|
|
|
}
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- confirmWarehouseEntry(row).then(res => {
|
|
|
- this.$message.success("出库成功");
|
|
|
- this.getDetails(this.form.id)
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- })
|
|
|
+ if (row.confirmDispatchVehicles == 1) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeInoutstorage(row).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ confirmWarehouseEntry(row).then(res => {
|
|
|
+ this.$message.success("出库成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (name == '开票') {
|
|
|
this.$message.error("待开发");
|
|
|
@@ -1576,4 +1776,9 @@ export default {
|
|
|
::v-deep#out-table .back-two {
|
|
|
background: #ecf5ff !important;
|
|
|
}
|
|
|
+
|
|
|
+::v-deep .el-table--small td,
|
|
|
+.el-table--small th {
|
|
|
+ padding: 2px !important;
|
|
|
+}
|
|
|
</style>
|