Commit ce3a4b8b authored by 张海景's avatar 张海景

update:修改质量列表和延迟时间

parent 7a07fb8c
...@@ -7,8 +7,8 @@ export default { ...@@ -7,8 +7,8 @@ export default {
// #endif // #endif
}, },
//把想要全局的数据放在globalData对象里,globalData是uniapp的不可以自定义命名。 //把想要全局的数据放在globalData对象里,globalData是uniapp的不可以自定义命名。
globalData:{ globalData: {
printSocket:null printSocket: null
}, },
onShow: function () {}, onShow: function () {},
onHide: function () {} onHide: function () {}
...@@ -25,4 +25,9 @@ export default { ...@@ -25,4 +25,9 @@ export default {
/deep/ .times .uni-date-picker__container { /deep/ .times .uni-date-picker__container {
height: 275px !important; height: 275px !important;
} }
/deep/ .uni-pagination__num-tag {
width: 60rpx !important;
height: 60rpx !important;
}
</style> </style>
...@@ -63,15 +63,15 @@ export default { ...@@ -63,15 +63,15 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleClick( ){ handleClick() {
if (this.tableParams.userName) { if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName; this.params.userName = this.tableParams.userName;
} }
if (this.tableParams.nickName) { if (this.tableParams.nickName) {
this.params.nickName = this.tableParams.nickName; this.params.nickName = this.tableParams.nickName;
} }
this.params.pageNum = 1 this.params.pageNum = 1;
this.getList() this.getList();
}, },
async getList() { async getList() {
const res = await this.$u.api.getUserList(this.params); const res = await this.$u.api.getUserList(this.params);
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
}, },
// 分页触发 // 分页触发
change(e) { change(e) {
this.params.pageNum = e.current this.params.pageNum = e.current;
this.getList() this.getList();
}, },
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr; this.tableSelectData = arr;
......
...@@ -14,17 +14,14 @@ ...@@ -14,17 +14,14 @@
</u-form> </u-form>
</view> </view>
<view> <view>
<zb-table ref="zbTable" rowKey="userName" <zb-table ref="zbTable" rowKey="userName" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
: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 class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
data: { data: {
type: Object, type: Object,
...@@ -41,32 +38,33 @@ ...@@ -41,32 +38,33 @@
total: 0, total: 0,
tableParams: { tableParams: {
nickName: null, nickName: null,
userName: null, userName: null
}, },
tableData: [], tableData: [],
tableSelectData: [], tableSelectData: [],
tableColumn: [{ tableColumn: [
{
type: 'radio', type: 'radio',
width: 40 width: 40
}, },
{ {
name: 'userName', name: 'userName',
label: '编号', label: '编号',
width: 160, width: 160
}, },
{ {
name: 'nickName', name: 'nickName',
label: '名称', label: '名称',
width: 200, width: 200
}, },
{ {
name: 'workstationName', name: 'workstationName',
label: '工作站', label: '工作站',
width: 160, width: 160
},
],
} }
]
};
}, },
// computed: { // computed: {
// tableData() { // tableData() {
...@@ -74,62 +72,62 @@ ...@@ -74,62 +72,62 @@
// } // }
// }, // },
mounted() { mounted() {
this.getList() this.getList();
// this.data.workstationName // this.data.workstationName
}, },
methods: { methods: {
handleClick( ){ handleClick() {
if (this.tableParams.userName) { if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName; this.params.userName = this.tableParams.userName;
} }
if (this.tableParams.nickName) { if (this.tableParams.nickName) {
this.params.nickName = this.tableParams.nickName; this.params.nickName = this.tableParams.nickName;
} }
this.params.pageNum = 1 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') console.log(res, 'res');
if (res.code == 200) { if (res.code == 200) {
this.tableData= res.rows.map(item => { this.tableData = res.rows.map((item) => {
return { return {
...item, ...item,
workstationName: this.data?.workstationName || null workstationName: this.data?.workstationName || null
} };
}) });
this.total = res.total this.total = res.total;
} }
}, },
// 分页触发 // 分页触发
change(e) { change(e) {
this.params.pageNum = e.current this.params.pageNum = e.current;
this.getList() this.getList();
}, },
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr this.tableSelectData = arr;
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dmodel-table { .dmodel-table {
height: 1200rpx; height: 1200rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
position: relative; position: relative;
} }
.tableForm{ .tableForm {
display: flex; display: flex;
margin-bottom:20rpx; margin-bottom: 20rpx;
} }
.btn{ .btn {
margin-left:10px; margin-left: 10px;
} }
.uni-pagination-box{ .uni-pagination-box {
position: absolute; position: absolute;
right:20rpx; right: 20rpx;
bottom:40rpx; bottom: 40rpx;
} }
</style> </style>
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
v-model="userTempVisible" v-model="userTempVisible"
width="1300rpx" width="1300rpx"
> >
<view class="feedback-card"> <view>
<userPersonnel ref="userPersonnelRef" v-if="userTempVisible" :data="usePersonData" /> <userPersonnel ref="userPersonnelRef" v-if="userTempVisible" :data="usePersonData" />
</view> </view>
</u-modal> </u-modal>
...@@ -1850,8 +1850,8 @@ export default { ...@@ -1850,8 +1850,8 @@ export default {
this.$u.toast('打印机连接失败'); this.$u.toast('打印机连接失败');
return; return;
} }
console.log(item, 'item') console.log(item, 'item');
debugger debugger;
//工单 //工单
this.$u.api this.$u.api
.feedback({ .feedback({
...@@ -2042,10 +2042,10 @@ export default { ...@@ -2042,10 +2042,10 @@ export default {
this.materialRequestFormVisible = false; this.materialRequestFormVisible = false;
}, },
materialRequestSave() { materialRequestSave() {
if(!this.curTaskInfo.pickingReason){ if (!this.curTaskInfo.pickingReason) {
this.materialRequestVisible = true this.materialRequestVisible = true;
this.$u.toast("原因不能为空!") this.$u.toast('原因不能为空!');
return return;
} }
const rst = []; const rst = [];
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
......
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