Commit 83d92631 authored by shifangwuji's avatar shifangwuji

9/20

parent ede52623
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询列表 // 查询列表
export function queryList(params) { export function queryList(params) {
return request({ return request({
url: '/ysgxlog/queryYsGxLogByPagination', url: '/ysgxlog/select',
method: 'get', method: 'get',
params params
}) })
...@@ -39,23 +39,6 @@ export function updataInfo(data) { ...@@ -39,23 +39,6 @@ export function updataInfo(data) {
}) })
} }
// 逻辑删除基础信息接口
export function deleteLogical(id) {
return request({
url: '/ysgxlog/deleteLogical/' + id,
method: 'delete'
})
}
// 导出信息接口
export function exporTable(params) {
return request({
url: '/wbchemistrybaseinfo/export',
method: 'get',
params,
responseType: 'blob'
})
}
// 根据key值查询数据字典数据 // 根据key值查询数据字典数据
export function getDictData(params) { export function getDictData(params) {
return request({ return request({
......
...@@ -52,13 +52,14 @@ ...@@ -52,13 +52,14 @@
<hr style="margin: 0 0 20px 0; width: 81%;"> <hr style="margin: 0 0 20px 0; width: 81%;">
<el-row :gutter="40"> <el-row :gutter="40">
<el-col :span="12" > <el-col :span="12">
<el-form-item label="jbcode:" style="flex-basis: 50%;" prop="jbcode"> <el-form-item label="jbcode:" style="flex-basis: 50%;" prop="jbcode">
<el-input ref="input5" v-model="form.jbcode" placeholder="请输入jbcode" :minlength="3" style="width: 868px" :maxlength="100" @keyup.enter.native="handleTab(4, $event)" /> <el-input ref="input5" v-model="form.jbcode" placeholder="请输入jbcode" :minlength="3" style="width: 868px" :maxlength="100" @keyup.enter.native="handleTab(4, $event)" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 提取 jbtype、jbrank 和 jbLot -->
<el-row :gutter="0" style="display: flex; width: 81%;"> <el-row :gutter="0" style="display: flex; width: 81%;">
<el-col :span="8"> <el-col :span="8">
<el-form :model="form" ref="form" :rules="rules" label-width="80px"> <el-form :model="form" ref="form" :rules="rules" label-width="80px">
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40"> <el-row :gutter="40">
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="wbcode:" style="flex-basis: 50%;" prop="wbcode"> <el-form-item label="wbcode:" style="flex-basis: 50%;" prop="wbcode">
...@@ -104,16 +106,17 @@ ...@@ -104,16 +106,17 @@
<el-row :gutter="40"> <el-row :gutter="40">
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="jlcod:" style="flex-basis: 50%;" prop="jlcod"> <el-form-item label="jlcod:" style="flex-basis: 50%;" prop="jlcod">
<el-input ref="input8" v-model="form.jlbcod" placeholder="请输入jlbcod" :minlength="3" style="width: 868px" :maxlength="100" @keyup.enter.native="handleTab(7, $event)" /> <el-input ref="input8" v-model="form.jlcod" placeholder="请输入jlcod" :minlength="3" style="width: 868px" :maxlength="100" @keyup.enter.native="handleTab(7, $event)" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 提取 jltype、jllot 和 jlbzq -->
<el-row :gutter="0" style="display: flex; width: 81%;"> <el-row :gutter="0" style="display: flex; width: 81%;">
<el-col :span="8"> <el-col :span="8">
<el-form :model="form" ref="form" :rules="rules" label-width="80px"> <el-form :model="form" ref="form" :rules="rules" label-width="80px">
<el-form-item label="jltype:" prop="jltype"> <el-form-item label="jltype:" prop="jltype">
<el-input v-model="form.jbtype" placeholder="jltype" :disabled="true" style="width: 100%;" /> <el-input v-model="form.jltype" placeholder="jltype" :disabled="true" style="width: 100%;" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -121,7 +124,7 @@ ...@@ -121,7 +124,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form :model="form" ref="form" :rules="rules" label-width="80px"> <el-form :model="form" ref="form" :rules="rules" label-width="80px">
<el-form-item label="jllot:" prop="jllot"> <el-form-item label="jllot:" prop="jllot">
<el-input v-model="form.jbrank" placeholder="jllot" :disabled="true" style="width: 100%;" /> <el-input v-model="form.jllot" placeholder="jllot" :disabled="true" style="width: 100%;" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -129,7 +132,7 @@ ...@@ -129,7 +132,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form :model="form" ref="form" :rules="rules" label-width="80px"> <el-form :model="form" ref="form" :rules="rules" label-width="80px">
<el-form-item label="jlbzq:" prop="jlbzq"> <el-form-item label="jlbzq:" prop="jlbzq">
<el-input v-model="form.jbLot" placeholder="jlbzq" :disabled="true" style="width: 100%;" /> <el-input v-model="form.jlbzq" placeholder="jlbzq" :disabled="true" style="width: 100%;" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -166,12 +169,6 @@ export default { ...@@ -166,12 +169,6 @@ export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
form: {
jbcode: '', // 输入的jbcode
jbtype: '', // 从jbcode中提取的jbtype
jbrank: '', // 从jbcode中提取的jbrank
jbLot: '', // 从jbcode中提取的jbLot
},
isRequired: false, isRequired: false,
// 对应后端配置文件cy.init.pgxList的的内容 // 对应后端配置文件cy.init.pgxList的的内容
phdList: ['003'], phdList: ['003'],
...@@ -185,7 +182,11 @@ export default { ...@@ -185,7 +182,11 @@ export default {
jbcode: '', jbcode: '',
jbtype: '', jbtype: '',
jbrank: '', jbrank: '',
jbLot: '' jbLot: '',
jlcod: '',
jltype: '',
jllot: '',
jlbzq: ''
}, },
rule: { rule: {
pn: [{ required: true, message: '请输入pn', trigger: 'blur' }], pn: [{ required: true, message: '请输入pn', trigger: 'blur' }],
...@@ -234,9 +235,51 @@ export default { ...@@ -234,9 +235,51 @@ export default {
}, },
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
this.form.page = 1 // 先触发表单验证
this.getList() this.$refs.form.validate(valid => {
if (valid) {
// 表单验证通过,执行查询操作
queryList({
pn: this.form.pn,
lot: this.form.lot,
gx: this.form.gx,
machine: this.form.machine,
})
.then(response => {
if (response.data.success) {
// 如果后端返回成功信息,显示成功提示
MessageBox.alert('查询成功', '成功', {
confirmButtonText: '确定',
type: 'success',
});
// 执行下一步操作
this.doNextAction();
} else {
// 如果后端返回错误信息,显示错误提示
MessageBox.alert(response.data.message, '错误', {
confirmButtonText: '确定',
type: 'error',
});
}
})
.catch(error => {
// 处理请求错误
console.error(error);
});
} else {
// 表单验证失败,显示错误信息
MessageBox.alert('请完整填写所有字段', '错误', {
confirmButtonText: '确定',
type: 'error',
});
}
});
},
doNextAction() {
// 执行下一步操作的逻辑
}, },
/** 查询基础信息列表 */ /** 查询基础信息列表 */
getList() { getList() {
this.loading = true this.loading = true
...@@ -281,7 +324,7 @@ export default { ...@@ -281,7 +324,7 @@ export default {
init() { init() {
this.getDict() this.getDict()
}, },
// 提价时要调的接口 // 保存时要调的接口
submitForm() { submitForm() {
this.$confirm('是否确认保存?', '提示', { this.$confirm('是否确认保存?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -348,6 +391,16 @@ export default { ...@@ -348,6 +391,16 @@ export default {
}, },
immediate: true, // 立即执行一次以处理初始值 immediate: true, // 立即执行一次以处理初始值
}, },
'form.jlcod': {
handler(newJlcod) {
// 当 jlcod 字段发生变化时,解析它并更新相关字段的值
const parts = newJlcod.split(',');
this.form.jltype = parts[0] || '';
this.form.jllot = parts[1] || '';
this.form.jlbzq = parts[2] || '';
},
immediate: true, // 立即执行一次以处理初始值
},
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment