rev:出库页面优化

This commit is contained in:
2023-08-25 10:16:02 +08:00
parent 6ca13d6d8a
commit b3394dac77
2 changed files with 26 additions and 2 deletions

View File

@@ -51,6 +51,7 @@
<el-button <el-button
slot="left" slot="left"
class="filter-item" class="filter-item"
:loading="loadingAlldiv"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@@ -61,7 +62,7 @@
<el-button <el-button
slot="left" slot="left"
class="filter-item" class="filter-item"
:loading="loadingAutodiv" :loading="loadingAlldiv"
type="primary" type="primary"
icon="el-icon-check" icon="el-icon-check"
size="mini" size="mini"
@@ -75,6 +76,7 @@
class="filter-item" class="filter-item"
type="primary" type="primary"
icon="el-icon-check" icon="el-icon-check"
:loading="loadingAlldiv"
size="mini" size="mini"
:disabled="button2" :disabled="button2"
@click="oneCancel()" @click="oneCancel()"
@@ -87,6 +89,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
:loading="loadingAlldiv"
:disabled="button3" :disabled="button3"
@click="openStructIvt" @click="openStructIvt"
> >
@@ -417,10 +420,14 @@ export default {
openStructIvt() { openStructIvt() {
this.currentRow.remark = '' this.currentRow.remark = ''
this.currentRow.stor_id = this.storId this.currentRow.stor_id = this.storId
this.loadingAlldiv = true
checkoutbill.getStructIvt(this.currentRow).then(res => { checkoutbill.getStructIvt(this.currentRow).then(res => {
this.openParam = res this.openParam = res
this.structshow = true this.structshow = true
this.openRow = this.currentRow this.openRow = this.currentRow
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
}) })
}, },
sectQueryChange(val) { sectQueryChange(val) {
@@ -527,14 +534,22 @@ export default {
} }
}, },
allCancel() { allCancel() {
this.loadingAlldiv = true
checkoutbill.allCancel(this.mstrow).then(res => { checkoutbill.allCancel(this.mstrow).then(res => {
this.queryTableDtl() this.queryTableDtl()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
}) })
}, },
oneCancel() { oneCancel() {
this.loadingAlldiv = true
if (this.currentRow.iostorinvdtl_id !== null) { if (this.currentRow.iostorinvdtl_id !== null) {
checkoutbill.allCancel(this.currentRow).then(res => { checkoutbill.allCancel(this.currentRow).then(res => {
this.queryTableDtl() this.queryTableDtl()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
}) })
} }
}, },

View File

@@ -15,7 +15,7 @@
<!--左侧插槽--> <!--左侧插槽-->
<slot name="left" /> <slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button> <el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
<el-button slot="left" type="primary" @click="submit">保存</el-button> <el-button slot="left" v-loading.fullscreen.lock="fullscreenLoading" type="primary" @click="submit">保存</el-button>
</span> </span>
</div> </div>
</span> </span>
@@ -154,6 +154,7 @@ export default {
return { return {
dialogVisible: false, dialogVisible: false,
dialogVisible2: false, dialogVisible2: false,
fullscreenLoading: false,
goal_unassign_qty: 0, goal_unassign_qty: 0,
queryrow: {}, queryrow: {},
sects: [], sects: [],
@@ -264,9 +265,13 @@ export default {
rows.push(item) rows.push(item)
} }
}) })
this.fullscreenLoading = true
checkoutbill.manualDiv({ 'row': this.queryrow, 'rows': rows }).then(res => { checkoutbill.manualDiv({ 'row': this.queryrow, 'rows': rows }).then(res => {
this.$emit('update:dialogShow', false) this.$emit('update:dialogShow', false)
this.$emit('StructIvtClosed') this.$emit('StructIvtClosed')
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
}) })
} else { } else {
this.$confirm('未分配重量不为0,是否继续提交?') this.$confirm('未分配重量不为0,是否继续提交?')
@@ -277,9 +282,13 @@ export default {
rows.push(item) rows.push(item)
} }
}) })
this.fullscreenLoading = true
checkoutbill.manualDiv({ 'row': this.queryrow, 'rows': rows }).then(res => { checkoutbill.manualDiv({ 'row': this.queryrow, 'rows': rows }).then(res => {
this.$emit('update:dialogShow', false) this.$emit('update:dialogShow', false)
this.$emit('StructIvtClosed') this.$emit('StructIvtClosed')
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
}) })
}) })
.catch(_ => { .catch(_ => {