add:外协添加发货状态;todo:手持查询未修改
This commit is contained in:
@@ -54,4 +54,12 @@ export function query4(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { getHeader, getHeader2, materPlanDtlQuery, query1, query2, query3, query4 }
|
||||
export function confirmOutStore(data) {
|
||||
return request({
|
||||
url: 'api/statistical/confirmOutStore',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { getHeader, getHeader2, materPlanDtlQuery, query1, query2, query3, query4, confirmOutStore }
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否发货">
|
||||
<el-form-item label="发货状态">
|
||||
<el-select
|
||||
v-model="query.is_send"
|
||||
clearable
|
||||
@@ -110,14 +110,30 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="crud.selections.length < 1"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="typeChange"
|
||||
>
|
||||
确认发货
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:max-height="590"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="45" />
|
||||
<el-table-column prop="send_date" label="计划发货日期" width="120px" />
|
||||
<el-table-column prop="workorder_code" label="工令号" width="120px" />
|
||||
<el-table-column prop="org_id" label="所属组织" width="120px" :formatter="orgFormat" />
|
||||
@@ -127,12 +143,14 @@
|
||||
<el-table-column prop="workorder_status" label="工令状态" width="150px" :formatter="stateFormat" />
|
||||
<el-table-column prop="storagevehicle_code" label="托盘号" />
|
||||
<el-table-column prop="num_bucket" label="桶数" />
|
||||
<el-table-column prop="total_qty" label="托盘重量" min-width="120px"/>
|
||||
<el-table-column prop="total_qty" label="托盘重量" min-width="120px" />
|
||||
<el-table-column prop="create_name" label="组盘人" />
|
||||
<el-table-column prop="create_time" label="组盘时间" min-width="150px" />
|
||||
<el-table-column prop="is_send" label="是否已发货" min-width="120px" :formatter="formatResult" />
|
||||
<el-table-column prop="is_send" label="发货状态" min-width="120px" :formatter="formatResult" />
|
||||
<el-table-column prop="send_name" label="发货人" />
|
||||
<el-table-column prop="send_time" label="发货时间" min-width="150px" />
|
||||
<el-table-column prop="out_name" label="出库人" />
|
||||
<el-table-column prop="out_time" label="出库时间" min-width="150px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -151,6 +169,7 @@ import DateRangePicker from '@/components/DateRangePicker'
|
||||
import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog'
|
||||
import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog'
|
||||
import Date from '@/utils/datetime'
|
||||
import report from '@/api/wms/statistics/report'
|
||||
import workorder from '@/api/wms/pdm/workorder'
|
||||
|
||||
export default {
|
||||
@@ -188,8 +207,9 @@ export default {
|
||||
openParam: {},
|
||||
query_flag: true,
|
||||
passList: [
|
||||
{ 'label': '是', 'value': '1' },
|
||||
{ 'label': '否', 'value': '0' }
|
||||
{ 'label': '未出库', 'value': '0' },
|
||||
{ 'label': '已出库', 'value': '1' },
|
||||
{ 'label': '已发货', 'value': '2' }
|
||||
],
|
||||
permission: {
|
||||
}
|
||||
@@ -204,6 +224,25 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkboxT(row) {
|
||||
return row.is_send === '1'
|
||||
},
|
||||
typeChange() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
this.$confirm('是否确认发货?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
report.confirmOutStore(this.checkrows).then(res => {
|
||||
if (res.code === '0') {
|
||||
this.crud.notify(res.desc, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
} else {
|
||||
this.crud.notify('操作完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
},
|
||||
@@ -214,13 +253,12 @@ export default {
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
}else{
|
||||
} else {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
orgFormat(row) {
|
||||
for (const item of this.Depts) {
|
||||
@@ -240,11 +278,11 @@ export default {
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
mytoQuery(array1){
|
||||
if(array1 === null){
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
}else{
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
@@ -263,9 +301,13 @@ export default {
|
||||
}
|
||||
},
|
||||
formatResult(row) {
|
||||
if (row.is_send === '1') {
|
||||
return '是'
|
||||
} else return '否'
|
||||
if (row.is_send === '2') {
|
||||
return '已发货'
|
||||
} else if (row.is_send === '1') {
|
||||
return '已出库'
|
||||
} else {
|
||||
return '未出库'
|
||||
}
|
||||
},
|
||||
stateFormat(row) {
|
||||
return this.dict.label.workorder_status[row.workorder_status]
|
||||
|
||||
Reference in New Issue
Block a user