add:出库单据同步,其他出入库单页面,调拨出入库单页面
This commit is contained in:
213
nladmin-ui/src/views/wms/st/allocationIn/index.vue
Normal file
213
nladmin-ui/src/views/wms/st/allocationIn/index.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form :inline="true" class="demo-form-inline" label-position="right" label-width="80px" label-suffix=":">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input v-model="query.blurry" size="mini" clearable placeholder="单据号/订单号/供应商"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.bill_id" size="mini" clearable placeholder="单据编号"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="query.order_no" size="mini" clearable placeholder="订单号"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplier_name" size="mini" clearable placeholder="供应商名称"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="query.bill_status" clearable size="mini" placeholder="全部" class="filter-item"
|
||||
@change="crud.toQuery">
|
||||
<el-option v-for="item in billStatusOptions" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="query.createTime" type="daterange" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" @change="crud.toQuery"/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini"
|
||||
:disabled="audit_flag" @click="issueReturnBill">下发回传单
|
||||
</el-button>
|
||||
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-printer" size="mini"
|
||||
:disabled="audit_flag" @click="printBill">打印
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row
|
||||
style="width: 100%;" @selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column v-permission="['admin','purchasemst:del','purchasemst:edit']" label="操作" width="115"
|
||||
align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation :data="scope.row" :permission="permission" :disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_id" width="160" label="单据编号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_id }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号"/>
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型"/>
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态"/>
|
||||
<el-table-column label="明细数" align="center" prop="dtl_count" width="80"/>
|
||||
<el-table-column label="单据总数" align="center" prop="total_qty" width="80"/>
|
||||
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80"/>
|
||||
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
|
||||
<template slot-scope="scope">
|
||||
<p v-if="scope.row.forwardZD == '0'">-</p>
|
||||
<template v-else-if="scope.row.forwardZD == '1'">
|
||||
<el-popconfirm confirm-button-text="是" cancel-button-text="否" icon="el-icon-info" icon-color="red"
|
||||
title="是否重新转发中鼎?" @confirm="toForwardZD">
|
||||
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<p v-else>成功</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码"/>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称"/>
|
||||
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人"/>
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="150" label="创建时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.create_time) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="modify_date" width="150" label="修改时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.modify_date) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination/>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable"/>
|
||||
<ViewDialog :dialog-show.sync="viewShow" :row-mst="mstrow" @AddChanged="querytable"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/views/wms/st/allocationIn/purchase'
|
||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/purchase/AddDialog'
|
||||
import ViewDialog from '@/views/wms/st/purchase/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'AllocationIn',
|
||||
components: {AddDialog, ViewDialog, crudOperation, rrOperation, udOperation, pagination},
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '调拨入库单',
|
||||
optShow: {add: true, reset: true},
|
||||
idField: 'id',
|
||||
url: '/api/purchasemst/107',
|
||||
crudMethod: {...crudPurchase},
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'purchasemst:add'],
|
||||
edit: ['admin', 'purchasemst:edit'],
|
||||
del: ['admin', 'purchasemst:del']
|
||||
},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
audit_flag: true,
|
||||
billStatusOptions: [{value: '0', label: '已创建'}, {value: '1', label: '执行中'}, {value: '2', label: '已完成'}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
return ({'0': '已创建', '1': '执行中', '2': '已完成'})[row.bill_status] || row.bill_status
|
||||
},
|
||||
formatDate(val) {
|
||||
if (!val) return '';
|
||||
if (typeof val === 'string') return val;
|
||||
const d = new Date(val);
|
||||
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')} ${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`
|
||||
},
|
||||
toForwardZD() {
|
||||
console.log(123)
|
||||
}, toView(index, row) {
|
||||
this.mstrow = row;
|
||||
this.viewShow = true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
this.audit_flag = val.length == 0
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
this.currentRow = currentRow || {};
|
||||
this.audit_flag = this.crud.selections.length === 0
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections;
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO);
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id);
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认下发以下单据的回传单?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.issueReturnBill(ids).then(() => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS);
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
printBill() {
|
||||
const selections = this.crud.selections;
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO);
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id);
|
||||
const billIds = selections.map(s => s.order_no).join('、')
|
||||
this.$confirm('确认打印以下单据的物料标签?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.print(ids).then(() => {
|
||||
this.crud.notify('打印指令已发送', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.crud.notify('打印失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
50
nladmin-ui/src/views/wms/st/allocationIn/purchase.js
Normal file
50
nladmin-ui/src/views/wms/st/allocationIn/purchase.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/api/purchasemst/107/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function issueReturnBill(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/issueReturnBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function print(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst/print',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print }
|
||||
199
nladmin-ui/src/views/wms/st/allocationOut/index.vue
Normal file
199
nladmin-ui/src/views/wms/st/allocationOut/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form :inline="true" class="demo-form-inline" label-position="right" label-width="80px" label-suffix=":">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input v-model="query.blurry" size="mini" clearable placeholder="单据号/订单号/供应商" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.bill_id" size="mini" clearable placeholder="单据编号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="query.order_no" size="mini" clearable placeholder="订单号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplier_name" size="mini" clearable placeholder="供应商名称" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="query.bill_status" clearable size="mini" placeholder="全部" class="filter-item" @change="crud.toQuery">
|
||||
<el-option v-for="item in billStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="query.createTime" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" @change="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-permission="['admin','purchasemst:del','purchasemst:edit']" label="操作" width="115" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation :data="scope.row" :permission="permission" :disabled-edit="canUd(scope.row)" :disabled-dle="canUd(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_id" width="160" label="单据编号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_id }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型" />
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态" />
|
||||
<el-table-column label="明细数" align="center" prop="dtl_count" width="80" />
|
||||
<el-table-column label="单据总数" align="center" prop="total_qty" width="80" />
|
||||
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80" />
|
||||
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
|
||||
<template slot-scope="scope">
|
||||
<p v-if="scope.row.forwardZD == '0'">-</p>
|
||||
<template v-else-if="scope.row.forwardZD == '1'">
|
||||
<el-popconfirm confirm-button-text="是" cancel-button-text="否" icon="el-icon-info" icon-color="red" title="是否重新转发中鼎?" @confirm="toForwardZD">
|
||||
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<p v-else>成功</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码" />
|
||||
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称" />
|
||||
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="150" label="创建时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.create_time) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="modify_date" width="150" label="修改时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.modify_date) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :row-mst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/views/wms/st/allocationOut/purchase'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/purchase/AddDialog'
|
||||
import ViewDialog from '@/views/wms/st/purchase/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'AllocationOut',
|
||||
components: { AddDialog, ViewDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '调拨出库单',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'id',
|
||||
url: '/api/purchasemst/106',
|
||||
crudMethod: { ...crudPurchase },
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'purchasemst:add'],
|
||||
edit: ['admin', 'purchasemst:edit'],
|
||||
del: ['admin', 'purchasemst:del']
|
||||
},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
audit_flag: true,
|
||||
billStatusOptions: [
|
||||
{ value: '0', label: '已创建' },
|
||||
{ value: '1', label: '执行中' },
|
||||
{ value: '2', label: '已完成' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
const map = { '0': '已创建', '1': '执行中', '2': '已完成' }
|
||||
return map[row.bill_status] || row.bill_status
|
||||
},
|
||||
auditStatusFormat(row) {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
return map[row.status] || row.status || '-'
|
||||
},
|
||||
formatDate(val) {
|
||||
if (!val) return ''
|
||||
if (typeof val === 'string') return val
|
||||
const d = new Date(val)
|
||||
const y = d.getFullYear()
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(d.getDate()).padStart(2, '0')
|
||||
const h = String(d.getHours()).padStart(2, '0')
|
||||
const min = String(d.getMinutes()).padStart(2, '0')
|
||||
const s = String(d.getSeconds()).padStart(2, '0')
|
||||
return y + '-' + m + '-' + day + ' ' + h + ':' + min + ':' + s
|
||||
},
|
||||
toForwardZD() {
|
||||
console.log(123)
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
console.log(val.length)
|
||||
if (val.length == 0) {
|
||||
this.audit_flag = true
|
||||
} else {
|
||||
this.audit_flag = false
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.currentRow = {}
|
||||
} else {
|
||||
this.currentRow = currentRow
|
||||
}
|
||||
this.audit_flag = this.crud.selections.length === 0
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认下发以下单据的回传单?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.issueReturnBill(ids).then(() => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
50
nladmin-ui/src/views/wms/st/allocationOut/purchase.js
Normal file
50
nladmin-ui/src/views/wms/st/allocationOut/purchase.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/api/purchasemst/106/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function issueReturnBill(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/issueReturnBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function print(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst/print',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print }
|
||||
@@ -297,11 +297,13 @@ export default {
|
||||
const requestTypeMap = {
|
||||
'0001': '生产入库',
|
||||
'0005': '采购入库',
|
||||
'102': '销售出库',
|
||||
'103': '采购入库',
|
||||
'0009': '手工入库',
|
||||
'1001': '销售出库',
|
||||
'0006': '生产领料',
|
||||
'0007': '库存调拨',
|
||||
'106': '调拨出库',
|
||||
'107': '调拨入库',
|
||||
'109': '其他入库',
|
||||
'1005': '生产出库',
|
||||
|
||||
222
nladmin-ui/src/views/wms/st/otherIn/index.vue
Normal file
222
nladmin-ui/src/views/wms/st/otherIn/index.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form :inline="true" class="demo-form-inline" label-position="right" label-width="80px" label-suffix=":">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input v-model="query.blurry" size="mini" clearable placeholder="单据号/订单号/供应商" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.bill_id" size="mini" clearable placeholder="单据编号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="query.order_no" size="mini" clearable placeholder="订单号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplier_name" size="mini" clearable placeholder="供应商名称" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="query.bill_status" clearable size="mini" placeholder="全部" class="filter-item" @change="crud.toQuery">
|
||||
<el-option v-for="item in billStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="query.createTime" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" @change="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-printer" size="mini"
|
||||
:disabled="audit_flag" @click="printBill">打印
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-permission="['admin','purchasemst:del','purchasemst:edit']" label="操作" width="115" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation :data="scope.row" :permission="permission" :disabled-edit="canUd(scope.row)" :disabled-dle="canUd(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_id" width="160" label="单据编号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_id }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型" />
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态" />
|
||||
<el-table-column label="明细数" align="center" prop="dtl_count" width="80" />
|
||||
<el-table-column label="单据总数" align="center" prop="total_qty" width="80" />
|
||||
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80" />
|
||||
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
|
||||
<template slot-scope="scope">
|
||||
<p v-if="scope.row.forwardZD == '0'">-</p>
|
||||
<template v-else-if="scope.row.forwardZD == '1'">
|
||||
<el-popconfirm confirm-button-text="是" cancel-button-text="否" icon="el-icon-info" icon-color="red" title="是否重新转发中鼎?" @confirm="toForwardZD">
|
||||
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<p v-else>成功</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码" />
|
||||
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称" />
|
||||
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="150" label="创建时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.create_time) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="modify_date" width="150" label="修改时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.modify_date) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :row-mst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/views/wms/st/otherIn/purchase'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/purchase/AddDialog'
|
||||
import ViewDialog from '@/views/wms/st/purchase/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'OtherIn',
|
||||
components: { AddDialog, ViewDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '其他入库单',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'id',
|
||||
url: '/api/purchasemst/109',
|
||||
crudMethod: { ...crudPurchase },
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'purchasemst:add'],
|
||||
edit: ['admin', 'purchasemst:edit'],
|
||||
del: ['admin', 'purchasemst:del']
|
||||
},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
audit_flag: true,
|
||||
billStatusOptions: [
|
||||
{ value: '0', label: '已创建' },
|
||||
{ value: '1', label: '执行中' },
|
||||
{ value: '2', label: '已完成' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
const map = { '0': '已创建', '1': '执行中', '2': '已完成' }
|
||||
return map[row.bill_status] || row.bill_status
|
||||
},
|
||||
auditStatusFormat(row) {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
return map[row.status] || row.status || '-'
|
||||
},
|
||||
formatDate(val) {
|
||||
if (!val) return ''
|
||||
if (typeof val === 'string') return val
|
||||
const d = new Date(val)
|
||||
const y = d.getFullYear()
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(d.getDate()).padStart(2, '0')
|
||||
const h = String(d.getHours()).padStart(2, '0')
|
||||
const min = String(d.getMinutes()).padStart(2, '0')
|
||||
const s = String(d.getSeconds()).padStart(2, '0')
|
||||
return y + '-' + m + '-' + day + ' ' + h + ':' + min + ':' + s
|
||||
},
|
||||
toForwardZD() {
|
||||
console.log(123)
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
console.log(val.length)
|
||||
if (val.length == 0) {
|
||||
this.audit_flag = true
|
||||
} else {
|
||||
this.audit_flag = false
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.currentRow = {}
|
||||
} else {
|
||||
this.currentRow = currentRow
|
||||
}
|
||||
this.audit_flag = this.crud.selections.length === 0
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认下发以下单据的回传单?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.issueReturnBill(ids).then(() => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
printBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.order_no).join('、')
|
||||
this.$confirm('确认打印以下单据的物料标签?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.print(ids).then(() => {
|
||||
this.crud.notify('打印指令已发送', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.crud.notify('打印失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
50
nladmin-ui/src/views/wms/st/otherIn/purchase.js
Normal file
50
nladmin-ui/src/views/wms/st/otherIn/purchase.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/api/purchasemst/109/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function issueReturnBill(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/issueReturnBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function print(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst/print',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print }
|
||||
199
nladmin-ui/src/views/wms/st/otherOut/index.vue
Normal file
199
nladmin-ui/src/views/wms/st/otherOut/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form :inline="true" class="demo-form-inline" label-position="right" label-width="80px" label-suffix=":">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input v-model="query.blurry" size="mini" clearable placeholder="单据号/订单号/供应商" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.bill_id" size="mini" clearable placeholder="单据编号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="query.order_no" size="mini" clearable placeholder="订单号" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplier_name" size="mini" clearable placeholder="供应商名称" @keyup.enter.native="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="query.bill_status" clearable size="mini" placeholder="全部" class="filter-item" @change="crud.toQuery">
|
||||
<el-option v-for="item in billStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="query.createTime" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" @change="crud.toQuery" />
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-permission="['admin','purchasemst:del','purchasemst:edit']" label="操作" width="115" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation :data="scope.row" :permission="permission" :disabled-edit="canUd(scope.row)" :disabled-dle="canUd(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_id" width="160" label="单据编号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_id }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="order_no" width="150" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip prop="order_type" width="100" label="订单类型" />
|
||||
<el-table-column :formatter="billStatusFormat" prop="bill_status" width="100" label="单据状态" />
|
||||
<el-table-column label="明细数" align="center" prop="dtl_count" width="80" />
|
||||
<el-table-column label="单据总数" align="center" prop="total_qty" width="80" />
|
||||
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80" />
|
||||
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
|
||||
<template slot-scope="scope">
|
||||
<p v-if="scope.row.forwardZD == '0'">-</p>
|
||||
<template v-else-if="scope.row.forwardZD == '1'">
|
||||
<el-popconfirm confirm-button-text="是" cancel-button-text="否" icon="el-icon-info" icon-color="red" title="是否重新转发中鼎?" @confirm="toForwardZD">
|
||||
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<p v-else>成功</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码" />
|
||||
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称" />
|
||||
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="150" label="创建时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.create_time) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="modify_date" width="150" label="修改时间">
|
||||
<template slot-scope="scope">{{ formatDate(scope.row.modify_date) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :row-mst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/views/wms/st/otherOut/purchase'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/purchase/AddDialog'
|
||||
import ViewDialog from '@/views/wms/st/purchase/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'OtherOut',
|
||||
components: { AddDialog, ViewDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '其他出库单',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'id',
|
||||
url: '/api/purchasemst/108',
|
||||
crudMethod: { ...crudPurchase },
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'purchasemst:add'],
|
||||
edit: ['admin', 'purchasemst:edit'],
|
||||
del: ['admin', 'purchasemst:del']
|
||||
},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
audit_flag: true,
|
||||
billStatusOptions: [
|
||||
{ value: '0', label: '已创建' },
|
||||
{ value: '1', label: '执行中' },
|
||||
{ value: '2', label: '已完成' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '0'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
const map = { '0': '已创建', '1': '执行中', '2': '已完成' }
|
||||
return map[row.bill_status] || row.bill_status
|
||||
},
|
||||
auditStatusFormat(row) {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
return map[row.status] || row.status || '-'
|
||||
},
|
||||
formatDate(val) {
|
||||
if (!val) return ''
|
||||
if (typeof val === 'string') return val
|
||||
const d = new Date(val)
|
||||
const y = d.getFullYear()
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(d.getDate()).padStart(2, '0')
|
||||
const h = String(d.getHours()).padStart(2, '0')
|
||||
const min = String(d.getMinutes()).padStart(2, '0')
|
||||
const s = String(d.getSeconds()).padStart(2, '0')
|
||||
return y + '-' + m + '-' + day + ' ' + h + ':' + min + ':' + s
|
||||
},
|
||||
toForwardZD() {
|
||||
console.log(123)
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
console.log(val.length)
|
||||
if (val.length == 0) {
|
||||
this.audit_flag = true
|
||||
} else {
|
||||
this.audit_flag = false
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.currentRow = {}
|
||||
} else {
|
||||
this.currentRow = currentRow
|
||||
}
|
||||
this.audit_flag = this.crud.selections.length === 0
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const ids = selections.map(s => s.id)
|
||||
const billIds = selections.map(s => s.bill_id).join('、')
|
||||
this.$confirm('确认下发以下单据的回传单?\n' + billIds, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.issueReturnBill(ids).then(() => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
50
nladmin-ui/src/views/wms/st/otherOut/purchase.js
Normal file
50
nladmin-ui/src/views/wms/st/otherOut/purchase.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/api/purchasemst/108/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function issueReturnBill(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/issueReturnBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function print(ids) {
|
||||
return request({
|
||||
url: '/api/purchasemst/print',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print }
|
||||
@@ -118,7 +118,7 @@ export default {
|
||||
title: '采购入库单',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'id',
|
||||
url: '/api/purchasemst',
|
||||
url: '/api/purchasemst/103',
|
||||
crudMethod: { ...crudPurchase },
|
||||
queryOnPresenterCreated: true
|
||||
})
|
||||
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/api/purchasemst/' + id,
|
||||
url: '/api/purchasemst/103/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user