This commit is contained in:
zds
2022-11-29 10:38:16 +08:00
parent c0b5d25642
commit e23f0b0b1d
3 changed files with 79 additions and 44 deletions

View File

@@ -65,6 +65,7 @@ public class WastecchangeServiceImpl implements WastecchangeService {
for(int i=0;i<array.size();i++){
JSONObject jo = array.getJSONObject(i);
jo.put("tech_type",tech_type);
jo.put("edit","0");
array2.add(jo);
}
allmaterialIds.put("content",array2);

View File

@@ -79,7 +79,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
}
map.put("inspection_type", MapUtil.getStr(whereJson, "inspection_type"));
map.put("bill_status", MapUtil.getStr(whereJson, "bill_status"));
JSONObject json = WQL.getWO("QL_TEST_INSPECTIONSHEET001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mater.material_code,mater.material_name");
JSONObject json = WQL.getWO("QL_TEST_INSPECTIONSHEET001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.bill_status,mst.confirm_time desc,mst.inspection_code");
return json;
}

View File

@@ -35,18 +35,18 @@
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="change_id" label="记录标识" />
<el-table-column v-if="false" prop="material_id" label="物料标识" />
<el-table-column prop="material_code" label="物料编码" width="120px" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="120px" show-overflow-tooltip />
<el-table-column prop="material_code" label="物料编码" width="120px" />
<el-table-column prop="material_name" label="物料名称" width="120px" />
<el-table-column prop="" label="型号" />
<el-table-column prop="tech_type" label="工艺" :formatter="formName" />
<el-table-column prop="cf_qty" label="CF" width="120">
<template slot-scope="scope">
<el-table-column prop="cf_qty" label="CF" width="95" align="center">
<template scope="scope">
<span v-show="scope.row.edit">{{ scope.row.cf_qty }}</span>
<el-input-number
v-model="scope.row.cf_qty"
size="small"
style="width: 95px"
v-show="!scope.row.edit"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -54,12 +54,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="yz_qty" label="YZ" width="120">
<el-table-column prop="yz_qty" label="YZ" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.yz_qty }}</span>
<el-input-number
v-model="scope.row.yz_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -67,25 +69,29 @@
/>
</template>
</el-table-column>
<el-table-column prop="cx_qty" label="CX" width="120">
<el-table-column prop="cx_qty" label="CX" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.cx_qty }}</span>
<el-input-number
v-model="scope.row.cx_qty"
v-show="!scope.row.edit"
size="small"
:controls="false"
style="width: 95px"
style="width: 80px"
controls-position="right"
:precision="2"
:min="-10000"
/>
</template>
</el-table-column>
<el-table-column prop="yc_qty" label="YC" width="120">
<el-table-column prop="yc_qty" label="YC" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.yc_qty }}</span>
<el-input-number
v-model="scope.row.yc_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -93,12 +99,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="jy_qty" label="JY" width="120">
<el-table-column prop="jy_qty" label="JY" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.jy_qty }}</span>
<el-input-number
v-model="scope.row.jy_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -106,12 +114,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="lt_qty" label="LT" width="120">
<el-table-column prop="lt_qty" label="LT" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.lt_qty }}</span>
<el-input-number
v-model="scope.row.lt_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -119,12 +129,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="sj_qty" label="SJ" width="120">
<el-table-column prop="sj_qty" label="SJ" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.sj_qty }}</span>
<el-input-number
v-model="scope.row.sj_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -132,12 +144,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="ys_qty" label="YS" width="120">
<el-table-column prop="ys_qty" label="YS" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.ys_qty }}</span>
<el-input-number
v-model="scope.row.ys_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -145,12 +159,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="ds_qty" label="DS" width="120">
<el-table-column prop="ds_qty" label="DS" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.ds_qty }}</span>
<el-input-number
v-model="scope.row.ds_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -158,12 +174,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="cqx_qty" label="CQX" width="120">
<el-table-column prop="cqx_qty" label="CQX" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.cqx_qty }}</span>
<el-input-number
v-model="scope.row.cqx_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -171,12 +189,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="xqx_qty" label="XQX" width="120">
<el-table-column prop="xqx_qty" label="XQX" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.xqx_qty }}</span>
<el-input-number
v-model="scope.row.xqx_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -184,12 +204,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="qx_qty" label="QX" width="120">
<el-table-column prop="qx_qty" label="QX" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.qx_qty }}</span>
<el-input-number
v-model="scope.row.qx_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -197,12 +219,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="jcf_qty" label="JCF" width="120">
<el-table-column prop="jcf_qty" label="JCF" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.jcf_qty }}</span>
<el-input-number
v-model="scope.row.jcf_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -210,12 +234,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="tb_qty" label="TB" width="120">
<el-table-column prop="tb_qty" label="TB" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.tb_qty }}</span>
<el-input-number
v-model="scope.row.tb_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -223,12 +249,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="ycr_qty" label="YCR" width="120">
<el-table-column prop="ycr_qty" label="YCR" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.ycr_qty }}</span>
<el-input-number
v-model="scope.row.ycr_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -236,12 +264,14 @@
/>
</template>
</el-table-column>
<el-table-column prop="gz_qty" label="GZ" width="120">
<el-table-column prop="gz_qty" label="GZ" width="95">
<template slot-scope="scope">
<span v-show="scope.row.edit">{{ scope.row.gz_qty }}</span>
<el-input-number
v-model="scope.row.gz_qty"
v-show="!scope.row.edit"
size="small"
style="width: 95px"
style="width: 80px"
:controls="false"
controls-position="right"
:precision="2"
@@ -249,11 +279,13 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_name" label="维护人" />
<el-table-column prop="create_time" label="维护时间" width="150px"/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<el-table-column prop="create_name" label="维护人" width="120" />
<el-table-column prop="create_time" label="维护时间" width="140"/>
<el-table-column v-permission="[]" label="操作" width="180" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="success" size="mini" :loading="confirm_flg" @click="confirm(scope.row)">确认</el-button>
<el-button v-show="!scope.row.edit" type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button v-show="scope.row.edit" type="success" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
<el-button type="success" size="mini" :loading="confirm_flg" icon="el-icon-check" @click="confirm(scope.row)">确认</el-button>
</template>
</el-table-column>
</el-table>
@@ -316,14 +348,16 @@ export default {
return '氢气脱蜡'
}
},
handleEdit(index, row) {
row.edit = !row.edit
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
},
confirm(row) {
this.confirm_flg = true
crudWastecchange.confirm(row).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.refresh()
this.confirm_flg = false
}).catch(() => {
this.crud.refresh()
this.confirm_flg = false
})
}