半成品盘点
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
<div class="search-label">仓库</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -27,56 +27,43 @@
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">业务类型</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
<input type="text" class="filter-input" v-model="material_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">载具号</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
<input type="text" class="filter-input" v-model="storagevehicle_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">货位号</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
<input type="text" class="filter-input" v-model="struct_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">盘点位</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value3" filterable clearable placeholder="请选择">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options3"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
v-for="item in options2"
|
||||
:key="item.point_code"
|
||||
:label="item.point_name"
|
||||
:value="item.point_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_2 flexend">
|
||||
<button class="button button--primary">查询</button>
|
||||
<button class="button button--primary">下发</button>
|
||||
<button class="button button--primary">盘点确认</button>
|
||||
<button class="button button--primary">实盘为准</button>
|
||||
<button class="button button--primary">账务为准</button>
|
||||
<div class="search-item_3">
|
||||
<button class="button button--primary" @click="_checkGetDtlAll">查询</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === '' || value2 === ''}" @click="_checkSendTask">下发</button>
|
||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': dataList.length === 0}" @click="_checkConfirm">盘点确认</button>
|
||||
<button class="button button--primary" :disabled="disabled3" :class="{'button--defalut': pkId === ''}" @click="_checkConfirmOffer">实盘为准</button>
|
||||
<button class="button button--primary" :disabled="disabled4" :class="{'button--defalut': pkId === ''}" @click="_checkConfirmFinance">账务为准</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,7 +82,6 @@
|
||||
<th>重量(kg)</th>
|
||||
<th>盘点重量(kg)</th>
|
||||
<th>盘点数量</th>
|
||||
<th>单重(g)</th>
|
||||
<th>是否异常</th>
|
||||
<th>盘点状态</th>
|
||||
<th>盘点站台</th>
|
||||
@@ -107,25 +93,29 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in [1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7]" :key="i">
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.bill_code}" @click="toRadio(e)">
|
||||
<td>{{ i + 1 }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.qty | numeric(3)}}</td>
|
||||
<td>{{e.base_qty | numeric(3)}}</td>
|
||||
<td><input type="number" v-model="e.fac_qty"></td>
|
||||
<td>{{ ['正常', '盘亏', '盘盈'][Number(e.check_resultI)] }}</td>
|
||||
<td v-if="e.status === '01'">生成</td>
|
||||
<td v-if="e.status === '04'">盘点中</td>
|
||||
<td v-if="e.status === '05'">已盘点</td>
|
||||
<td v-if="e.status === '06'">异常处理中</td>
|
||||
<td v-if="e.status === '07'">异常处理完成</td>
|
||||
<td v-if="e.status === '99'">确认完成</td>
|
||||
<td>{{ e.checkpoint_id }}</td>
|
||||
<td>{{ e.is_down }}</td>
|
||||
<td>{{e.check_code}}</td>
|
||||
<td v-if="e.check_type === '31'">计划盘点</td>
|
||||
<td v-if="e.check_type === '32'">临时盘点</td>
|
||||
<td>{{ e.create_name }}</td>
|
||||
<td>{{ e.create_time }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -136,16 +126,122 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { checkGetBcpStor, checkGetDtlAll, checkGetPoint, checkSendTask, checkConfirm, checkConfirmOffer, checkConfirmFinance } from '@config/getData2.js'
|
||||
import {dateTimeFtt} from '@config/utils.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
date: [new Date((new Date().getTime() - 24 * 60 * 60 * 1000)), new Date((new Date().getTime() + 24 * 60 * 60 * 1000))],
|
||||
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||
options2: [],
|
||||
value2: '',
|
||||
options3: [],
|
||||
value3: ''
|
||||
material_code: '',
|
||||
storagevehicle_code: '',
|
||||
struct_code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
disabled4: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._checkGetBcpStor()
|
||||
this._checkGetDtlAll()
|
||||
this._checkGetPoint()
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
async _checkGetBcpStor () {
|
||||
let res = await checkGetBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
// grid
|
||||
async _checkGetDtlAll () {
|
||||
let res = await checkGetDtlAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.struct_code)
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
// 盘点位下拉框
|
||||
async _checkGetPoint () {
|
||||
let res = await checkGetPoint()
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
|
||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
||||
},
|
||||
// 下发(按钮)
|
||||
async _checkSendTask () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId || !this.value2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkSendTask(this.pkObj, this.value2)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 盘点确认
|
||||
async _checkConfirm () {
|
||||
this.disabled2 = true
|
||||
let flag = false
|
||||
this.dataList.map(el => {
|
||||
if (el.fac_qty === '' || Number(el.fac_qty) < 0) {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
if (flag) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirm(this.dataList)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
// 实盘为准
|
||||
async _checkConfirmOffer () {
|
||||
this.disabled3 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirmOffer(this.pkObj)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled3 = false
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
// 财务为准
|
||||
async _checkConfirmFinance () {
|
||||
this.disabled4 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled4 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirmFinance(this.pkObj)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled4 = false
|
||||
} catch (e) {
|
||||
this.disabled4 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user