|
@@ -88,6 +88,13 @@
|
|
|
@click="handleWarehouse(record)"
|
|
|
class="button-primary"
|
|
|
id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
|
|
|
+ @click="handleFinishBill(record)"
|
|
|
+ class="button-primary"
|
|
|
+ id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -95,7 +102,7 @@
|
|
|
v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
|
|
|
@click="handleDel(record)"
|
|
|
id="purchaseReturnList-del-btn">删除</a-button>
|
|
|
- <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnOutStock'))">--</span>
|
|
|
+ <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.state == 'CHECKED' && ($hasPermissions('B_purchaseReturnOutStock') || $hasPermissions('B_purchaseReturnFinishBill')))">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -107,7 +114,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { purchaseTargetList } from '@/api/purchase'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
-import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill } from '@/api/purchaseReturn'
|
|
|
+import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturn'
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate },
|
|
|
data () {
|
|
@@ -233,7 +240,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- // 入库
|
|
|
+ // 生成出库单
|
|
|
handleWarehouse (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
@@ -254,6 +261,27 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 完结单据
|
|
|
+ handleFinishBill (row) {
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要完结该单据吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ purchaseReturnFinishBill({ sn: row.purchaseReturnSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getParentDealer () {
|
|
|
purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
|
if (res.status == 200) {
|