opt:add:新增手持软废直接出库功能;rev:1.合同台账优化2.厂家质保书优化
This commit is contained in:
@@ -55,4 +55,12 @@ export function confirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStatus, getParameter, sure, confirm }
|
||||
export function checkData(data) {
|
||||
return request({
|
||||
url: 'api/factorywarrantymst/checkData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStatus, getParameter, sure, confirm, checkData }
|
||||
|
||||
357
mes/qd/src/views/wms/ql/factorywarranty/checkDialog.vue
Normal file
357
mes/qd/src/views/wms/ql/factorywarranty/checkDialog.vue
Normal file
@@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="结果录入"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form2" :inline="true" :model="form" size="mini" label-width="110px" style="border: 1px solid #cfe0df;">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料:" prop="material_code">
|
||||
<el-input v-model.trim="form.material_code" disabled class="input-with-select" style="width: 250px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批号:" prop="pcsn">
|
||||
<el-input v-model.trim="form.pcsn" disabled class="input-with-select" style="width: 250px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据号:" prop="inspection_code">
|
||||
<el-input v-model.trim="form.inspection_code" disabled class="input-with-select" style="width: 250px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家:" prop="manufactor">
|
||||
<el-input v-model.trim="form.manufactor" disabled class="input-with-select" style="width: 250px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="等级:" prop="grade">
|
||||
<el-select
|
||||
v-model="form.grade"
|
||||
:disabled="form.bill_status === '99'"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 250px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_IVT_LEVEL"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结果:" prop="result">
|
||||
<el-select
|
||||
v-model="form.result"
|
||||
:disabled="form.bill_status === '99'"
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 250px;"
|
||||
@change="changeType"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.resulfList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input v-model.trim="form.remark" :disabled="form.bill_status === '99'" type="textarea" class="input-with-select" style="width: 750px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="right" />
|
||||
</span>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
height="250"
|
||||
:cell-style="cellStyle"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column v-if="false" prop="is_ok" label="是否合格" align="center" />
|
||||
<el-table-column v-if="false" prop="form_remark" label="表格备注" align="center" />
|
||||
<el-table-column prop="inspection_item_code" label="项点编码" align="center" />
|
||||
<el-table-column prop="inspection_item_name" label="项点名称" align="center" />
|
||||
<el-table-column prop="inspection_item_type_name" label="项点类别" align="center" />
|
||||
<el-table-column prop="down_limit" label="标准值下限" align="center" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="up_limit" label="标准值上限" align="center" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="value" label="检测值" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].value"
|
||||
:controls="false"
|
||||
size="mini"
|
||||
type="number"
|
||||
:disabled="form.tableData[scope.$index].inspection_item_code !== 'CJZB00004'"
|
||||
:precision="4"
|
||||
/>
|
||||
<el-button
|
||||
v-if="form.tableData[scope.$index].inspection_item_code === 'CJZB00004'"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="checkData(form.tableData[scope.$index])"
|
||||
>
|
||||
复核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model.trim="form.tableData[scope.$index].dtl_remark" size="mini" :disabled="form.bill_status === '99'" class="edit-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudFactorywarrantymst from '@/api/wms/ql/factorywarrantymst'
|
||||
|
||||
export default {
|
||||
name: 'ResultPutDialog',
|
||||
dicts: ['ST_IVT_LEVEL'],
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
is_check: false,
|
||||
resulfList: [
|
||||
{ 'label': '合格', 'value': '01' },
|
||||
{ 'label': '不合格', 'value': '02' }
|
||||
],
|
||||
form: {
|
||||
grade: '01',
|
||||
resultRemark: '',
|
||||
tableData: []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.form = this.openParam.form
|
||||
if (this.openParam.form.grade === '') {
|
||||
this.form.grade = '01'
|
||||
}
|
||||
}
|
||||
},
|
||||
'form.tableData': {
|
||||
handler(newValue, oldValue) {
|
||||
// this.computerResult()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$refs['tableData'].resetFields()
|
||||
},
|
||||
open() {
|
||||
this.is_check = false
|
||||
for (const item of this.form.tableData) {
|
||||
if (item.inspection_item_code === 'CJZB00004') {
|
||||
item.value = ''
|
||||
return
|
||||
}
|
||||
}
|
||||
this.is_check = true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
count() {
|
||||
},
|
||||
confirm() {
|
||||
if (this.is_check) {
|
||||
crudFactorywarrantymst.confirm(this.form).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
} else {
|
||||
this.crud.notify('请点击复核按钮并校验数据正确后进行确认!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
/*for (const item of this.form.tableData) {
|
||||
if (item.inspection_item_code === 'CJZB00004') {
|
||||
if (!item.value) {
|
||||
this.crud.notify('请填写检测值,并复核', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
crudFactorywarrantymst.sure(this.form).then(res => {
|
||||
crudFactorywarrantymst.confirm(this.form).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
})*/
|
||||
},
|
||||
sure() {
|
||||
const rows = this.form.tableData
|
||||
var flag = 0
|
||||
for (var row of rows) {
|
||||
if (!row.value) {
|
||||
flag = flag + 1
|
||||
}
|
||||
}
|
||||
if (flag === rows.length) {
|
||||
this.crud.notify('请至少填写一项检测值', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
const data = this.form
|
||||
crudFactorywarrantymst.sure(data).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('录入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||
const inspection_type = row.inspection_type
|
||||
const value = parseFloat(row.value)
|
||||
const up_limit = parseFloat(row.up_limit)
|
||||
const down_limit = parseFloat(row.down_limit)
|
||||
// 检测项
|
||||
if (inspection_type === '02') {
|
||||
if (column.property === 'value') {
|
||||
if ((value < down_limit) || (value > up_limit)) {
|
||||
row.is_ok = '0'
|
||||
if (value < down_limit) {
|
||||
row.form_remark = row.inspection_item_name + '超下限'
|
||||
}
|
||||
if (value > up_limit) {
|
||||
row.form_remark = row.inspection_item_name + '超上限'
|
||||
}
|
||||
return 'background: red'
|
||||
} else {
|
||||
row.form_remark = ''
|
||||
row.is_ok = '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computerResult() {
|
||||
const rows = this.form.tableData
|
||||
debugger
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].up_limit !== '') {
|
||||
if (rows[i].value === undefined) {
|
||||
this.crud.notify('有标准项点未输入完', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
// if (rows[i].value === 0) {
|
||||
// this.crud.notify(rows[i].inspection_item_name + '项点未维护', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// return false
|
||||
// }
|
||||
}
|
||||
this.form.result = '01'
|
||||
for (var row of rows) {
|
||||
if (row.is_ok === '0') {
|
||||
this.form.result = '02'
|
||||
}
|
||||
}
|
||||
if (this.form.result === '01') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
if (this.form.result === '02') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
},
|
||||
changeType() {
|
||||
const rows = this.form.tableData
|
||||
const flag = rows.some(row => row.value === '')
|
||||
if (flag) {
|
||||
this.crud.notify('请输入检验值', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.form.result = ''
|
||||
}
|
||||
},
|
||||
checkData(data) {
|
||||
data.inspection_id = this.form.inspection_id
|
||||
crudFactorywarrantymst.checkData(data).then(res => {
|
||||
this.is_check = res.is_check
|
||||
if (!this.is_check) {
|
||||
this.crud.notify('当前数据不正确,原数据为【' + res.value + '】', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return
|
||||
} else {
|
||||
this.crud.notify('数据正确', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -188,6 +188,7 @@
|
||||
|
||||
<AddDialog />
|
||||
<ResultPutDialog :dialog-show.sync="resultPutDialog" :open-param="openParam" />
|
||||
<checkDialog :dialog-show.sync="checkDialog" :open-param="openParam" />
|
||||
<PicDialog ref="child" :dialog-show.sync="PicDialog" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -202,6 +203,7 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import AddDialog from '@/views/wms/ql/factorywarranty/AddDialog'
|
||||
import ResultPutDialog from '@/views/wms/ql/factorywarranty/ResultPutDialog'
|
||||
import checkDialog from '@/views/wms/ql/factorywarranty/checkDialog'
|
||||
import PicDialog from '@/views/wms/ql/factorywarranty/PicDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getToken } from '@/utils/auth'
|
||||
@@ -209,7 +211,7 @@ import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'Factorywarranty',
|
||||
dicts: ['QC_INV_TYPE'],
|
||||
components: { PicDialog, AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, ResultPutDialog },
|
||||
components: { PicDialog, AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, ResultPutDialog, checkDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -235,6 +237,7 @@ export default {
|
||||
openParam: {},
|
||||
PicDialog: false,
|
||||
resultPutDialog: false,
|
||||
checkDialog: false,
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
@@ -327,6 +330,15 @@ export default {
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const inspection_id = _selectData[0].inspection_id
|
||||
const material_id = _selectData[0].material_id
|
||||
crudFactorywarrantymst.getParameter({ 'inspection_id': inspection_id, 'material_id': material_id }).then(res => {
|
||||
this.openParam = res
|
||||
this.checkDialog = true
|
||||
})
|
||||
},
|
||||
confirm2() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData.length === 0 || _selectData.length > 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
>
|
||||
<el-table-column prop="receive_code" label="到货通知单" width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="input_time" label="到货时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批次" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="receive_qty" label="到货重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="valmoney" label="到货金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="plan_date" label="资金计划" width="150px" show-overflow-tooltip />
|
||||
|
||||
@@ -88,7 +88,18 @@
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="downdtl()"
|
||||
>
|
||||
导出excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -165,6 +176,8 @@ import crudOrderproc from '@/api/wms/pcs/orderproc'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import ReceiveDialog from '@/views/wms/statistics/ledgerQuery/ReceiveDialog'
|
||||
import remarkDaing from '@/views/wms/statistics/ledgerQuery/remarkDaing'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'LedgerQuery',
|
||||
@@ -193,17 +206,16 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
procStatusList: [],
|
||||
procStatusList: [
|
||||
{ 'name': '生成', 'code': '生成' },
|
||||
{ 'name': '在途', 'code': '在途' },
|
||||
{ 'name': '完成', 'code': '完成' }
|
||||
],
|
||||
openParam: null,
|
||||
receiveDialog: false,
|
||||
remarkDaing: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudOrderproc.getProcStatus().then(res => {
|
||||
this.procStatusList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
@@ -226,6 +238,15 @@ export default {
|
||||
openRemarkDaing(row) {
|
||||
this.openParam = row.id
|
||||
this.remarkDaing = true
|
||||
},
|
||||
downdtl() {
|
||||
crud.downloadLoading = true
|
||||
download('/api/purchaseorderproc/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '合同台账', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user