Commit 1f3a00d3 authored by 李驰骋's avatar 李驰骋

Merge remote-tracking branch 'origin/dev' into dev

parents 89f2e5f1 8c6f39cb
...@@ -147,7 +147,7 @@ const install = (Vue, vm) => { ...@@ -147,7 +147,7 @@ const install = (Vue, vm) => {
//查看人员管理 //查看人员管理
userQuery: (params = {}) => userQuery: (params = {}) =>
vm.$u.get(config.adminPath + '/mes/md/workunitWorker/list', params), vm.$u.get(config.adminPath + '/mes/md/workunitWorker/getMdWorkunitWorkerByUserName', params),
//增加缺陷记录 //增加缺陷记录
addDefectrecord: (params = {}) => addDefectrecord: (params = {}) =>
...@@ -420,6 +420,8 @@ const install = (Vue, vm) => { ...@@ -420,6 +420,8 @@ const install = (Vue, vm) => {
abnormal: { abnormal: {
detail: (params = {}) => detail: (params = {}) =>
vm.$u.get(config.adminPath + '/qc/information/list', params), vm.$u.get(config.adminPath + '/qc/information/list', params),
getAbnormalNumber: () =>
vm.$u.get(config.adminPath + '/qc/report/getAbnormalNumber'),
newlyAdd: (params = {}) => newlyAdd: (params = {}) =>
vm.$u.postJson(config.adminPath + '/qc/report', params), vm.$u.postJson(config.adminPath + '/qc/report', params),
}, },
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
"请输入工作单元名称": "กรุณาใส่ชื่อหน่วยงาน", "请输入工作单元名称": "กรุณาใส่ชื่อหน่วยงาน",
"工作中心名称": "ชื่อศูนย์งาน", "工作中心名称": "ชื่อศูนย์งาน",
"工号": "หมายเลขพนักงาน", "工号": "หมายเลขพนักงาน",
"请输入编号": "กรุณาใส่หมายเลข", "请扫描/输入工号": "กรุณาสแกน/ป้อนหมายเลขที่ทํางานของคุณ",
"姓名": "ชื่อ", "姓名": "ชื่อ",
"请输入名称": "กรุณาใส่ชื่อ", "请输入名称": "กรุณาใส่ชื่อ",
"规格书类型:": "ประเภทเอกสารสเปค:", "规格书类型:": "ประเภทเอกสารสเปค:",
...@@ -296,5 +296,6 @@ ...@@ -296,5 +296,6 @@
"开始下载": "เริ่มดาวน์โหลด", "开始下载": "เริ่มดาวน์โหลด",
"进度:": "ความคืบหน้า:", "进度:": "ความคืบหน้า:",
"共": "ทั้งหมด", "共": "ทั้งหมด",
"条": "บทความ" "条": "บทความ",
"车间异常单编号": "หมายเลขคําสั่งซื้อข้อยกเว้นร้านค้า"
} }
\ No newline at end of file
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
"请输入工作单元名称": "请输入工作单元名称", "请输入工作单元名称": "请输入工作单元名称",
"工作中心名称": "工作中心名称", "工作中心名称": "工作中心名称",
"工号": "工号", "工号": "工号",
"请输入编号": "请输入编号", "请扫描/输入工号": "请扫描/输入工号",
"姓名": "姓名", "姓名": "姓名",
"请输入名称": "请输入名称", "请输入名称": "请输入名称",
"规格书类型:": "规格书类型:", "规格书类型:": "规格书类型:",
...@@ -296,5 +296,10 @@ ...@@ -296,5 +296,10 @@
"开始下载": "开始下载", "开始下载": "开始下载",
"进度:": "进度:", "进度:": "进度:",
"共": "共", "共": "共",
"条": "条" "条": "条",
"车间异常单编号": "车间异常单编号",
"查不到报工人数据": "查不到报工人数据",
"请输入报工人工号": "请输入报工人工号",
"选择原因": "选择原因",
"不合格原因": "不合格原因"
} }
\ No newline at end of file
<template>
<view class="dmodel-table">
<view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item :label="$t('不合格原因')" label-width="100px" name="abnormalReason">
<uni-easyinput type="text" v-model="tableParams.abnormalReason" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">{{$t('搜索')}}</u-button>
</u-form-item>
</u-form>
</view>
<view>
<zb-table ref="zbTable" rowKey="abnormalId" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
</view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view>
</template>
<script>
import i18n from '../../../../lang/index'
export default {
props: {
},
data() {
return {
params: {
pageNum: 1,
pageSize: 10,
abnormalType: "UNQUALIFIED_REASON"
},
total: 0,
tableParams: {
abnormalReason: null
},
tableData: [],
tableSelectData: [],
tableColumn: [
{
type: 'radio',
width: 40
},
{
name: 'abnormalReason',
label: i18n.t('不合格原因'),
width: 160
},
{
name: 'remark',
label: i18n.t('备注'),
width: 160
}
]
};
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted() {
this.getList();
// this.data.workstationName
},
methods: {
handleClick() {
if (this.tableParams.abnormalReason) {
this.params.abnormalReason = this.tableParams.abnormalReason;
} else {
delete this.params.abnormalReason
}
this.params.pageNum = 1;
this.getList();
},
async getList() {
const res = await this.$u.api.abnormal.detail(this.params);
if (res.code == 200) {
this.tableData = res.rows
this.total = res.total;
}
},
// 分页触发
change(e) {
this.params.pageNum = e.current;
this.getList();
},
toggleRowSelection(checked, arr) {
this.tableSelectData = arr;
}
}
};
</script>
<style lang="scss" scoped>
.dmodel-table {
height: 1200rpx;
margin-top: 20rpx;
padding: 0 20rpx;
position: relative;
}
.tableForm {
display: flex;
margin-bottom: 20rpx;
}
.btn {
margin-left: 10px;
}
.uni-pagination-box {
position: absolute;
right: 20rpx;
bottom: 40rpx;
}
</style>
\ No newline at end of file
...@@ -3,20 +3,13 @@ ...@@ -3,20 +3,13 @@
<view class="search"> <view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm"> <u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item :label="$t('工号')" label-width="60px" name="userName"> <u-form-item :label="$t('工号')" label-width="60px" name="userName">
<uni-easyinput type="text" v-model="tableParams.userName" :placeholder="$t('请输入编号')" /> <u-input type="text" v-model="tableParams.userName" :placeholder="$t('请扫描/输入工号')" @confirm="confirmUserName($event)"/>
</u-form-item>
<u-form-item :label="$t('姓名')" label-width="60px" name="nickName">
<uni-easyinput type="text" v-model="tableParams.nickName" :placeholder="$t('请输入名称')" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">{{$t('搜索')}}</u-button>
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<view> <view>
<zb-table ref="zbTable" rowKey="userName" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table> <zb-table ref="zbTable" rowKey="userName" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
</view> </view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view> </view>
</template> </template>
...@@ -33,8 +26,6 @@ export default { ...@@ -33,8 +26,6 @@ export default {
data() { data() {
return { return {
params: { params: {
pageNum: 1,
pageSize: 10,
workunitId: this.data?.workunitId || null workunitId: this.data?.workunitId || null
}, },
total: 0, total: 0,
...@@ -45,10 +36,6 @@ export default { ...@@ -45,10 +36,6 @@ export default {
tableData: [], tableData: [],
tableSelectData: [], tableSelectData: [],
tableColumn: [ tableColumn: [
{
type: 'selection',
width: 40
},
{ {
name: 'userName', name: 'userName',
label: i18n.t('工号'), label: i18n.t('工号'),
...@@ -74,10 +61,15 @@ export default { ...@@ -74,10 +61,15 @@ export default {
// } // }
// }, // },
mounted() { mounted() {
this.getList(); // this.getList();
// this.data.workstationName // this.data.workstationName
}, },
methods: { methods: {
confirmUserName(e) {
this.tableParams.userName = e
if (!this.tableParams.userName) return this.$u.toast(i18n.t('请输入报工人工号'))
this.handleClick()
},
handleClick() { handleClick() {
if (this.tableParams.userName) { if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName; this.params.userName = this.tableParams.userName;
...@@ -89,27 +81,16 @@ export default { ...@@ -89,27 +81,16 @@ export default {
} else { } else {
delete this.params.nickName delete this.params.nickName
} }
this.params.pageNum = 1;
this.getList(); this.getList();
}, },
async getList() { async getList() {
const res = await this.$u.api.userQuery(this.params); const res = await this.$u.api.userQuery(this.params);
console.log(res, 'res'); if (res.code == 200 && res.data) {
if (res.code == 200) { this.tableData.push(res.data)
this.tableData = res.rows.map((item) => { } else {
return { this.$u.toast(i18n.t('查不到报工人数据'))
...item,
workunitName: this.data?.workunitName || null
};
});
this.total = res.total;
} }
}, },
// 分页触发
change(e) {
this.params.pageNum = e.current;
this.getList();
},
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr; this.tableSelectData = arr;
......
This diff is collapsed.
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