Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="showLoading" type="primary" @click="allInsert">一键保存</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
@@ -89,7 +90,7 @@
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">盘点明细</span>
|
||||
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
|
||||
<span class="crud-opts-right2">
|
||||
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
@@ -99,10 +100,47 @@
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-if="crud.status.cu > 0"
|
||||
@click="queryDtl()"
|
||||
>
|
||||
添加盘点物料
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
v-if="crud.status.view > 0"
|
||||
@click="queryDtlCheck('1')"
|
||||
>
|
||||
已盘点
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
v-if="crud.status.view > 0"
|
||||
@click="queryDtlCheck('2')"
|
||||
>
|
||||
未盘点
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-thumb"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
v-if="crud.status.view > 0"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -123,8 +161,10 @@
|
||||
<span v-if="crud.status.cu > 0">{{ scope.row.storagevehicle_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip v-if="crud.status.view > 0" prop="base_qty" label="净重" width="150" align="center" :formatter="crud.formatNum3"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" v-if="crud.status.view > 0" label="备注" align="center" min-width="150" show-overflow-tooltip />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" width="200px" >
|
||||
<template scope="scope">
|
||||
<el-input v-model="scope.row.remark" size="mini" />
|
||||
@@ -148,6 +188,8 @@ import AddDtl from '@/views/wms/st/inStor/check/AddDtl'
|
||||
import check from '@/views/wms/st/inStor/check/check'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import DtlViewDialog from '@/views/wms/st/inStor/check/DtlViewDialog'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
check_code: '',
|
||||
@@ -177,8 +219,11 @@ export default {
|
||||
paramDtlView: '',
|
||||
dtlViewShow: false,
|
||||
dialogVisible: false,
|
||||
showLoading: false,
|
||||
showDtlLoading: false,
|
||||
dtlShow: false,
|
||||
flagnow: false,
|
||||
paramType: '',
|
||||
storId: null,
|
||||
nowrow: {},
|
||||
nowindex: '',
|
||||
@@ -231,6 +276,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
queryDtlCheck(type) {
|
||||
// 1-已盘点,2-未盘点
|
||||
this.paramType = type
|
||||
this.showDtlLoading = true
|
||||
check.getOutBillDtl({ 'check_id': this.form.check_id, 'type': type }).then(res => {
|
||||
this.form.tableData = res
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.check_dtl_status[row.status]
|
||||
},
|
||||
@@ -296,6 +350,34 @@ export default {
|
||||
openDtlView(row) {
|
||||
this.paramDtlView = row.storagevehicle_code
|
||||
this.dtlViewShow = true
|
||||
},
|
||||
allInsert() {
|
||||
if (this.form.check_type === '') {
|
||||
this.crud.notify('请选择盘点单类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.stor_id === '') {
|
||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.showLoading = true
|
||||
check.allInsert(this.form).then(res => {
|
||||
this.crud.cancelCU()
|
||||
this.showLoading = false
|
||||
}).catch(() => {
|
||||
this.showLoading = false
|
||||
})
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/check/download', { 'type': this.paramType, 'check_id': this.form.check_id }).then(result => {
|
||||
downloadFile(result, '盘点数据', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,4 +108,11 @@ export function disposeConfirm(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm }
|
||||
export function allInsert(data) {
|
||||
return request({
|
||||
url: '/api/check/allInsert',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm, allInsert }
|
||||
|
||||
Reference in New Issue
Block a user