|
@@ -18,11 +18,11 @@
|
|
|
@click="getReturns">
|
|
|
销售退货
|
|
|
</el-button>
|
|
|
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
- :disabled="false" @click="confirm(1)">确认发货
|
|
|
+ <el-button v-if="form.status!='已发货'" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
+ :disabled="!form.id" @click="confirm(1)">确认发货
|
|
|
</el-button>
|
|
|
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
|
|
|
- :disabled="false" @click="confirm(2)">撤销发货
|
|
|
+ <el-button v-if="form.status=='已发货'" class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
|
|
|
+ :disabled="!form.id" @click="confirm(2)">撤销发货
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -67,7 +67,7 @@
|
|
|
:disabled="form.generateTask == '已生成' || form.businessSource == '外部销售'">一键删除</el-button>
|
|
|
<el-button type="primary" plain size="small" :disabled="selectionMultilist.length == 0"
|
|
|
@click="allClick('派发销售单')">派发销售单</el-button>
|
|
|
- <el-button type="danger" plain size="small" @click="allClick('撤销派发')">撤销派发</el-button>
|
|
|
+ <el-button type="danger" plain size="small" @click="allClick('撤销派发')" :disabled="selectionMultilist.length == 0">撤销派发</el-button>
|
|
|
</template>
|
|
|
<template slot="goodsId" slot-scope="{ row }">
|
|
|
{{ row.goodsName }}
|
|
@@ -109,7 +109,7 @@
|
|
|
:icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
@click="rowSave(row, index)">保存
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled"
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled||row.sendNum>0"
|
|
|
:type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -1131,7 +1131,7 @@ export default {
|
|
|
if (type == 1) {
|
|
|
for (let item of this.form.orderItemsList) {
|
|
|
if (item.sendNum != item.goodsNum) {
|
|
|
- return this.$message.error("明细中存在未派发完的数据");
|
|
|
+ return this.$message.error("第"+Number(item.$index+1)+"行明细未发货,请先发货");
|
|
|
}
|
|
|
}
|
|
|
this.$confirm('是否确认发货?', '提示', {
|
|
@@ -1147,7 +1147,7 @@ export default {
|
|
|
});
|
|
|
confirmShipment(this.form).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
- this.getDetail(res.data.data.id)
|
|
|
+ this.getDetail(this.form.id)
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
});
|
|
@@ -1167,7 +1167,7 @@ export default {
|
|
|
});
|
|
|
revokeShipment(this.form).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
- this.getDetail(res.data.data.id)
|
|
|
+ this.getDetail(this.form.id)
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
});
|
|
@@ -1192,28 +1192,25 @@ export default {
|
|
|
this.distributeVisible = true
|
|
|
}
|
|
|
if (name == '撤销派发') {
|
|
|
+ let ids=[]
|
|
|
for (let item of this.selectionMultilist) {
|
|
|
if (item.sendNum == 0) {
|
|
|
return this.$message.error("请正确选择明细");
|
|
|
}
|
|
|
+ ids.push(item.id)
|
|
|
}
|
|
|
this.$confirm('是否撤销派发?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- let obj = {}
|
|
|
- obj = {
|
|
|
- ...this.form,
|
|
|
- orderItemsList: this.selectionMultilist
|
|
|
- }
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
- revokeDistributeShareSales(this.form).then(res => {
|
|
|
+ revokeDistributeShareSales({ itemIds:ids.join(',')}).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
this.getDetail(res.data.data.id)
|
|
|
}).finally(() => {
|