huangli865118801 3 years ago
parent
commit
7f77b0439f
  1. 26
      api/user.js
  2. 9
      pages.json
  3. 25
      pages/badProduct/badProduct.vue
  4. 25
      pages/stampingRecordList/stampingRecordList.vue
  5. 19
      pages/stopLineList/stopLineList.vue

26
api/user.js

@ -515,3 +515,29 @@ export function staff(data) {
});
}
/**
* 投入统计详情
* @param {Object} data
*/
export function putInDetail(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/put-in-detail`,
method: "get",
data
});
}
/**
* 投入统计详情
* @param {Object} data
*/
export function noDetail(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/no-detail`,
method: "get",
data
});
}

9
pages.json

@ -229,6 +229,15 @@
}
}
,{
"path" : "pages/stopLineList/stopLineList",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

25
pages/badProduct/badProduct.vue

@ -36,7 +36,7 @@
<view class="list-reson">
<view class="left">不良原因</view>
<view class="right">
<text>{{ reason[item.reason_no_id].title }}</text>
<text>{{ reason[item.reason_no_id]?reason[item.reason_no_id].title:'' }}</text>
<image src="../../static/next.png"></image>
</view>
</view>
@ -49,13 +49,13 @@
<view class="left">不良品处置</view>
<view class="right"><input v-model="item.remake" placeholder="请输入" /></view>
</view>
<view class="btn-jian" @tap="froms.splice(index, 1)" v-if="index > 0">
<view class="btn-jian" @tap="froms.splice(index, 1)" v-if="index > 0&&ifEdit!=0">
<image src="../../static/jian.png"></image>
<text>删除</text>
</view>
</view>
</view>
<view class="btn-jia" @tap="add">
<view class="btn-jia" @tap="add" v-if="ifEdit!=0">
<image src="../../static/jia.png"></image>
<text>添加</text>
</view>
@ -65,6 +65,7 @@
<script>
import { reasonNo, badReasons } from '../../api/index.js';
import {noDetail} from "../../api/user.js";
export default {
onLoad(e) {
this.planInfo = JSON.parse(decodeURIComponent(e.badProduct));
@ -72,10 +73,12 @@ export default {
reasonNo({ status: 1 }).then(res => {
this.reason = res;
});
this.getInfo()
},
data() {
return {
planInfo: {},
ifEdit:0,
frequency: ['白班', '夜班'],
reason: [],
froms: [
@ -117,12 +120,28 @@ export default {
frequency: 0
});
},
getInfo(){
noDetail({plan_id:this.planInfo.plan_id}).then(res=>{
if(res){
this.froms=res
this.ifEdit=1
this.froms.map(items=>{
console.log("不良品详情id",items.id)
res.map(its=>{
items.id=its.id
})
})
}
console.log("不良品详情",this.froms)
})
},
submit() {
let params = JSON.parse(JSON.stringify(this.froms));
params = params.map(item => {
item.reason_no_id = this.reason[item.reason_no_id].id;
return item;
});
this.buttonState = false;
this.$functions.confirm("是否进行此操作?").then(()=>{
badReasons({data: params}).then(res => {

25
pages/stampingRecordList/stampingRecordList.vue

@ -69,7 +69,9 @@
import {
firstCheckLists,
openLine,
trtj
trtj,
putInDetail,
noDetail
} from "../../api/user.js";
import {
mapGetters,
@ -96,8 +98,8 @@
buttonState:false,
froms:{
plan_id:'',
//in_line:'',
peoples:'',
in_line:'',
//peoples:'',
status:1,
frequency:0
},
@ -166,12 +168,21 @@
open(e){
this.froms.plan_id=e;
console.log("id",this.froms)
// refuni-popup , type ['top','left','bottom','right','center']
this.$refs.popup.open('center')
this.$refs.popup.open('center')
putInDetail({plan_id:e}).then(res=>{
if(res){
this.froms.frequency=res.frequency
this.froms.in_line=res.in_line
console.log("投入详情", this.froms.in_line)
}
})
},
tjrsBtn(id,frequencyId){
this.frequencyId=frequencyId;
tjrsBtn(){
this.buttonState = false;
trtj(this.froms).then(res=>{
this.$functions.success('提交成功').then(() => {

19
pages/stopLineList/stopLineList.vue

@ -0,0 +1,19 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>
Loading…
Cancel
Save