|
@@ -15,10 +15,13 @@
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
|
|
- :disabled="isDisabledTask" @click="generateOutbound">
|
|
|
|
|
|
+ :disabled="isDisabledTask" @click="generateOutbound" v-if="form.taskWhetherAdopt != '审核提交'">
|
|
{{ buttonText }}
|
|
{{ buttonText }}
|
|
</el-button>
|
|
</el-button>
|
|
-
|
|
|
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
|
|
|
|
+ v-if="form.taskWhetherAdopt == '审核提交'" @click="revokeTask">
|
|
|
|
+ 撤销出库任务审批
|
|
|
|
+ </el-button>
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="info" size="small"
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="info" size="small"
|
|
:disabled="form.status != '已发货' || form.returnsNumber == form.goodsTotalNum || editButton"
|
|
:disabled="form.status != '已发货' || form.returnsNumber == form.goodsTotalNum || editButton"
|
|
@click="getReturns">
|
|
@click="getReturns">
|
|
@@ -313,7 +316,10 @@ import {
|
|
revokeCheckOrder,
|
|
revokeCheckOrder,
|
|
goodsListXs,
|
|
goodsListXs,
|
|
revokeGenerateShipTask, goodsPageXs,
|
|
revokeGenerateShipTask, goodsPageXs,
|
|
- generateReturns
|
|
|
|
|
|
+ generateReturns,
|
|
|
|
+ whetherExistenceFinancing,
|
|
|
|
+ checkOrderRW,
|
|
|
|
+ revokeCheckOrderRW
|
|
} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
@@ -1942,34 +1948,83 @@ export default {
|
|
this.$refs["form"].validate((valid, done) => {
|
|
this.$refs["form"].validate((valid, done) => {
|
|
done();
|
|
done();
|
|
if (valid) {
|
|
if (valid) {
|
|
- submit({
|
|
|
|
|
|
+ console.log(111)
|
|
|
|
+ whetherExistenceFinancing({
|
|
bsType: "XS",
|
|
bsType: "XS",
|
|
...this.form
|
|
...this.form
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- // this.refresh(res.data.data.id)
|
|
|
|
- this.isDisabledTask = false
|
|
|
|
- generateShipTask(this.form).then(res => {
|
|
|
|
- this.$message.success("生成出库任务成功");
|
|
|
|
- // 将按钮文本更改为"撤销任务"
|
|
|
|
- this.buttonText = '撤销任务';
|
|
|
|
- // 将按钮颜色更改为对应的颜色
|
|
|
|
- this.buttonColor = 'warning'; // 比如改为warning
|
|
|
|
- this.refresh(res.data.data.id)
|
|
|
|
- this.refreshs(res.data.data.id, true)
|
|
|
|
- this.isContacts = true
|
|
|
|
- this.isApplySettlement = false
|
|
|
|
- this.isAdd = true
|
|
|
|
- this.isDisabled = true
|
|
|
|
- this.isAddBtn = true
|
|
|
|
- this.isDisabledTask = true
|
|
|
|
- // this.editButton = true // 把编辑按钮显示出来
|
|
|
|
- loading.close();
|
|
|
|
- }).catch(() => {
|
|
|
|
- loading.close();
|
|
|
|
- });
|
|
|
|
- }).catch(() => {
|
|
|
|
|
|
+ if (res.data.data == true) {
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: '加载中',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
|
+ });
|
|
|
|
+ submit({
|
|
|
|
+ bsType: "XS",
|
|
|
|
+ ...this.form
|
|
|
|
+ }).then(res => {
|
|
|
|
+ // this.refresh(res.data.data.id)
|
|
|
|
+ this.isDisabledTask = false
|
|
|
|
+ generateShipTask(this.form).then(res => {
|
|
|
|
+ this.$message.success("生成出库任务成功");
|
|
|
|
+ // 将按钮文本更改为"撤销任务"
|
|
|
|
+ this.buttonText = '撤销任务';
|
|
|
|
+ // 将按钮颜色更改为对应的颜色
|
|
|
|
+ this.buttonColor = 'warning'; // 比如改为warning
|
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
|
+ this.refreshs(res.data.data.id, true)
|
|
|
|
+ this.isContacts = true
|
|
|
|
+ this.isApplySettlement = false
|
|
|
|
+ this.isAdd = true
|
|
|
|
+ this.isDisabled = true
|
|
|
|
+ this.isAddBtn = true
|
|
|
|
+ this.isDisabledTask = true
|
|
|
|
+ // this.editButton = true // 把编辑按钮显示出来
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ loading.close();
|
|
|
|
+ })
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ loading.close();
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$confirm(res.data.data, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: '加载中',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
|
+ });
|
|
|
|
+ checkOrderRW({
|
|
|
|
+ bsType: "XS",
|
|
|
|
+ ...this.form
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.$message.success("提交成功");
|
|
|
|
+ // 将按钮文本更改为"撤销任务"
|
|
|
|
+ this.buttonText = '撤销任务';
|
|
|
|
+ // 将按钮颜色更改为对应的颜色
|
|
|
|
+ this.buttonColor = 'warning'; // 比如改为warning
|
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
|
+ this.refreshs(res.data.data.id, true)
|
|
|
|
+ this.isContacts = true
|
|
|
|
+ this.isApplySettlement = false
|
|
|
|
+ this.isAdd = true
|
|
|
|
+ this.isDisabled = true
|
|
|
|
+ this.isAddBtn = true
|
|
|
|
+ this.isDisabledTask = true
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ loading.close();
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
loading.close();
|
|
loading.close();
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
+
|
|
done();
|
|
done();
|
|
} else {
|
|
} else {
|
|
this.$message.error('请选择仓库')
|
|
this.$message.error('请选择仓库')
|
|
@@ -2037,6 +2092,30 @@ export default {
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ revokeTask() {
|
|
|
|
+ this.$confirm('是否撤销出库任务审批?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ revokeCheckOrderRW(this.form).then(res => {
|
|
|
|
+ this.buttonText = '生成任务';
|
|
|
|
+ // 将按钮颜色还原为success
|
|
|
|
+ this.buttonColor = 'success';
|
|
|
|
+ this.$message.success("撤销出库成功");
|
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
|
+ this.isApplySettlement = false
|
|
|
|
+ this.isContacts = true
|
|
|
|
+ this.isDisabled = true
|
|
|
|
+ this.isDisabledTask = false
|
|
|
|
+ this.$set(this.optionForm, 'disabled', false) // form 表单的禁用放开
|
|
|
|
+ this.$set(this.optionContactsBack, 'disabled', false) // table 表格的禁用放开
|
|
|
|
+ // this.editButton = true // 把编辑按钮显示出来
|
|
|
|
+ //添加删除按钮禁用
|
|
|
|
+ this.isAdd = true
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//联系人change
|
|
//联系人change
|
|
contactsChange(e) {
|
|
contactsChange(e) {
|
|
// 假设this.contactsOption是你的数组对象
|
|
// 假设this.contactsOption是你的数组对象
|