huangli865118801 3 years ago
parent
commit
1e76999367
  1. 14
      api/index.js
  2. 13
      api/user.js
  3. 16
      pages/badProduct/badProduct.vue
  4. 1
      pages/offLine/index.scss
  5. 44
      pages/offLine/offLine.vue
  6. 7
      pages/rawMaterial/rawMaterial.vue
  7. 75
      pages/rawMaterialInfo/rawMaterialInfo.vue
  8. 34
      pages/rework/rework.vue
  9. 35
      pages/stampingRecordList/stampingRecordList.vue
  10. 1
      pages/stopLine/index.scss
  11. 9
      pages/stopLine/stopLine.vue
  12. 2
      unpackage/cache/certdata
  13. 4
      unpackage/cache/wgt/__UNI__E896C30/app-service.js
  14. 2
      unpackage/cache/wgt/__UNI__E896C30/app-view.js
  15. 4
      unpackage/dist/build/app-plus/app-service.js
  16. 2
      unpackage/dist/build/app-plus/app-view.js

14
api/index.js

@ -139,3 +139,17 @@ export function repair(data) {
data
});
}
/**
* 下线
* @param {Object} data
*/
export function offline(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/offline`,
method: "post",
data
});
}

13
api/user.js

@ -487,4 +487,17 @@ export function productTcqConf(data) {
method: "get",
data
});
}
/**
* 产品TCQ配置值
* @param {Object} data
*/
export function rawFormDetail(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/raw-form-detail`,
method: "get",
data
});
}

16
pages/badProduct/badProduct.vue

@ -59,7 +59,7 @@
<image src="../../static/jia.png"></image>
<text>添加</text>
</view>
<view class="submit-btn"><button type="primary" @tap="submit">提交并发起审核</button></view>
<view class="submit-btn"><button :disabled="buttonState==false?true:false" type="primary" @tap="submit">提交并发起审核</button></view>
</view>
</template>
@ -82,12 +82,13 @@ export default {
{
plan_id: 0,
reason_no_id: 0,
math: 0,
math: "",
remake: '',
status: 1,
frequency: 0
}
]
],
buttonState:true,
};
},
methods: {
@ -110,7 +111,7 @@ export default {
this.froms.push({
plan_id: this.planInfo.plan_id,
reason_no_id: 0,
math: 0,
math: '',
remake: '',
status: 1,
frequency: 0
@ -122,9 +123,12 @@ export default {
item.reason_no_id = this.reason[item.reason_no_id].id;
return item;
});
badReasons({data:params}).then(res => {
this.buttonState = false;
badReasons({data: params}).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack({});
uni.navigateBack();
}).catch(res => {
this.buttonState = true;
});
});
}

1
pages/offLine/index.scss

@ -20,6 +20,7 @@
@include fonts(24upx,#999,400);
}
input{
text-align: right;
font-size: 26upx;
}
.next{

44
pages/offLine/offLine.vue

@ -48,42 +48,43 @@
<view class="list-list">
<view class="list-title">生产数量</view>
<view class="list-right">
<input placeholder="请输入生产数量" />
<input v-model="from.product_number" placeholder="请输入生产数量" />
</view>
</view>
<view class="list-list">
<view class="list-title">良品数量</view>
<view class="list-right">
<input placeholder="请输入良品数量" />
<input v-model="from.ok_number" placeholder="请输入良品数量" />
</view>
</view>
<view class="list-list">
<view class="list-title">返修区返修</view>
<view class="list-right">
<input placeholder="请输入" />
<input v-model="from.rework" placeholder="请输入" />
</view>
</view>
<view class="list-list">
<view class="list-title">在线返修数</view>
<view class="list-right">
<input placeholder="请输入" />
<input v-model="from.in_rework" placeholder="请输入" />
</view>
</view>
<view class="list-list">
<view class="list-title">报废数量</view>
<view class="list-right">
<input placeholder="请输入" />
<input v-model="from.no_number" placeholder="请输入" />
</view>
</view>
</view>
<view class="submit-btn">
<button type="primary">提交并发起审核</button>
<button type="primary" :disabled="buttonState==false?true:false" @tap="offLine()">提交并发起审核</button>
</view>
</view>
</template>
<script>
import {offline} from "../../api/index.js"
export default {
data() {
return {
@ -94,21 +95,48 @@
reason:["模具维修","设备维修","品质待定","辅料短缺","偶发停电"],
reasonIds:0,
mould:["1","2","3"],
mouldIds:0
mouldIds:0,
buttonState:true,
from:{
product_number:"",
ok_number:"",
rework:"",
no_number:"",
in_rework:"",
frequency:0,
plan_id:''
}
};
},methods:{
},
onLoad(e) {
this.from.plan_id=e.plan_id;
},
methods:{
bindline: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.lineIndex = e.target.value
},
bindfrequencyIds(e){
this.frequencyIds = e.target.value
this.from.frequency=e.target.value
},
bindReason(e){
this.reasonIds = e.target.value
},
bindmouldIds(e){
this.mouldIds = e.target.value
},
offLine(){
console.log("表单",this.from);
this.buttonState = false;
offline(this.from).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack();
}).catch(res => {
this.buttonState = true;
});
});
}
}
}

7
pages/rawMaterial/rawMaterial.vue

@ -7,7 +7,9 @@
<view>材料名称:</view><text>{{item.title}}</text>
</view>
<view class="card-right">
<image src="../../static/search.png"></image>
<image class="glass-cion" v-if="item.examine_status==0" src="../../static/search.png"></image>
<image class="sh-cion" v-if="item.examine_status==1" src="../../static/dsh.png"></image>
<image class="sh-cion" v-if="item.examine_status==2" src="../../static/ysh.png"></image>
</view>
</view>
<view class="card-dow-list">
@ -28,7 +30,8 @@
export default {
data() {
return {
list:[]
list:[],
type:0
};
},
onLoad() {

75
pages/rawMaterialInfo/rawMaterialInfo.vue

@ -52,11 +52,11 @@
</view>
</view>
<view class="testing">
<view v-for="(item,index) in materialItemList" :key="index">
<view v-for="(item,index) in item" :key="index">
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>{{item.title}}</text>
<text>{{item.check_item}}</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
@ -94,6 +94,15 @@
</view>
</view>
<picker @change="bindResult" :value="froms.result" :range="result">
<view class="testing-list" style="align-items: center;">
<view >检验结果:</view>
<view style="height: 50upx;border: 1upx solid #F1F1F1;width:200upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;margin-left: 100upx;">
{{result[froms.result-1]}}
<image style="width: 33upx;height: 33upx;" src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">检验不合格描述:</view>
<textarea v-model="froms.result_describe"
@ -101,7 +110,7 @@
placeholder="请输入抽检结果"></textarea>
</view>
<view class="submit-btn">
<button type="primary" @tap="submit">提交并发起审核</button>
<button type="primary" @tap="submit" v-if="type==2">提交并发起审核</button>
</view>
</view>
</view>
@ -111,11 +120,13 @@
import {
materialItem,
dictionary,
materialCheckForm
materialCheckForm,
rawFormDetail
} from "../../api/user.js"
export default {
data() {
return {
result:["合格","不合格"],
detectionMode: ["全检", "抽检"],
detectionModeIndex: 0,
determine: ["合格", "不合格"],
@ -123,41 +134,49 @@
ifCheck: false,
sendId: -1,
CyInfo: {},
materialItemList: [], //
item: [], //
crrentIds: 0,
type:0,
check_status:0,
froms: {
result:1,
purchase_id: '', //ID
name: '', //
rule: '', //
check_type: 0, //1=2=
supplier: '', //
order_no: '', //
materialItemList: [],
arrival_quantity: 0, //
number_of_inspections: 0, //
item: [],
arrival_quantity: "", //
number_of_inspections: "", //
result_describe: '', //
dimensional_inspection: [{
rule: 0,
no1: 0,
no2: 0,
no3: 0,
no4: 0,
no5: 0
rule: "",
no1: "",
no2: "",
no3: "",
no4: "",
no5: ""
}], //
}
};
},
onLoad(e) {
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.getMaterialItemList()
this.type=this.CyInfo.examine_status
this.check_status=this.CyInfo.check_status
this.getitem()
if(this.check_status==2){
this.getInfo()
}
},
methods: {
getMaterialItemList() {
getitem() {
materialItem().then(res => {
for (let b in res.item) {
this.materialItemList.push({
title: res.item[b],
this.item.push({
check_item: res.item[b],
standard: res.standard[b],
num: 0,
status: 0,
@ -169,18 +188,26 @@
})
},
getInfo(){
rawFormDetail({purchase_id:this.CyInfo.id}).then(res=>{
console.log('详情', res)
})
},
bindDetectionMode: function(e) {
this.detectionModeIndex = e.target.value;
},
bindDetermine: function(e, index) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.determineIndex = e.target.value;
this.materialItemList[index].status = e.target.value
this.item[index].status = e.target.value
},
bindResult(e){
this.froms.result=e.target.value+1
},
checkBtn(index) {
this.materialItemList[index].check == false ? this.materialItemList[index].check = true : this
.materialItemList[index].check = false;
this.item[index].check == false ? this.item[index].check = true : this
.item[index].check = false;
//this.sendId=index
},
@ -190,7 +217,7 @@
this.froms.rule=this.CyInfo.spec;
this.froms.purchase_id=this.CyInfo.id;
this.froms.check_type = this.detectionModeIndex + 1
this.froms.materialItemList = this.materialItemList;
this.froms.item = this.item;
materialCheckForm(this.froms).then(res => {
this.$functions.success("提交成功").then(() => {
uni.navigateBack({

34
pages/rework/rework.vue

@ -34,7 +34,7 @@
</view> -->
<view class="white-card" v-for="(item, index) in froms" :key="index" style="margin-top: 24upx;padding-top: 30upx;padding-bottom: 30upx;">
<view class="mid-card">
<picker :value="item.reason_no_id" range-key="title" :range="reason">
<picker @change="reasonChange($event, index)" :value="item.reason_no_id" range-key="title" :range="reason">
<view class="list-reson">
<view class="left">不良原因</view>
<view class="right">
@ -54,7 +54,7 @@
<!-- <image src="../../static/next.png"></image> -->
</view>
</view>
<picker :value="item.frequency" :range="frequency">
<picker @change="frequencyChange($event, index)" :value="item.frequency" :range="frequency">
<view class="list-reson">
<view class="left">班次</view>
<view class="right">
@ -95,7 +95,7 @@
<image src="../../static/jia.png"></image>
<text>添加</text>
</view>
<view class="submit-btn"><button @tap="submit" type="primary">提交并发起审核</button></view>
<view class="submit-btn"><button :disabled="buttonState==false?true:false" @tap="submit" type="primary">提交并发起审核</button></view>
</view>
</template>
@ -117,15 +117,17 @@ export default {
frequencyIds: 0,
reason: [],
reasonIds: 0,
buttonState:true,
froms: [
{
raw_name: '',
line_id: 0,
frequency: 0,
stamping_date: '',
reason_no_id: 0,
repair_regular: 0,
repair_scrap: 0
repair_regular: '',
repair_scrap: ''
}
]
};
@ -138,13 +140,19 @@ export default {
frequency: 0,
stamping_date: '',
reason_no_id: 0,
repair_regular: 0,
repair_scrap: 0
repair_regular: '',
repair_scrap: ''
});
},
dateChange(e, index) {
this.froms[index].stamping_date = e.detail.value;
},
reasonChange(e, index) {
this.froms[index].reason_no_id = e.detail.value;
},
frequencyChange(e, index) {
this.froms[index].frequency = e.detail.value;
},
submit() {
for (let b in this.froms) {
if (this.froms[b].raw_name == '') {
@ -162,11 +170,19 @@ export default {
item.reason_no_id = this.reason[item.reason_no_id].id;
return item;
});
repair({ data: params }).then(res => {
this.buttonState = false;
repair({data: params}).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack({});
uni.navigateBack();
}).catch(res => {
this.buttonState = true;
});
});
// repair({ data: params }).then(res => {
// this.$functions.success('').then(() => {
// uni.navigateBack({});
// });
// });
}
}
};

35
pages/stampingRecordList/stampingRecordList.vue

@ -25,9 +25,9 @@
</view>
</view>
<view class="btn-grounp">
<view v-if="item.status==0||item.status==2" @tap="openLine(item.plan_id)">开线</view>
<view v-if="item.status==1" class="btn-tx" @tap="stopLine(item)">停线</view>
<view v-if="item.status==0" class="btn-xx" @tap="offLine()">下线</view>
<view v-if="item.status!=1" @tap="openLine(item.plan_id)">开线</view>
<view class="btn-tx" @tap="stopLine(item)">停线</view>
<view v-if="item.status==1" class="btn-xx" @tap="offLine(item.plan_id)">下线</view>
<view class="btn-blp" @tap="badProduct(item)">不良品统计</view>
<view class="btn-back" @tap="rework(item)">返修</view>
</view>
@ -55,12 +55,12 @@
<view class="pop-list">
<text>状态:</text>
<view class="right-pic">
<text>{{status[froms.frequency]}}</text>
<text>{{status[froms.status-1]}}</text>
<image src="../../static/next.png"></image>
</view>
</view>
</picker>
<view class="submit" @tap="tjrsBtn()">提交</view>
<view class="submit" :disabled="buttonState==false?true:false" @tap="tjrsBtn()">提交</view>
</view>
</uni-popup>
</view>
@ -91,12 +91,13 @@
list:[],
status:["冲压","喷涂"],
frequency:["夜班", "白班"],
buttonState:false,
froms:{
plan_id:'',
in_line:'',
peoples:'',
status:'',
frequency:''
status:1,
frequency:0
},
power: [],
jurisdiction: [],
@ -122,13 +123,14 @@
this.froms.frequency = e.target.value
},
bindStatus: function(e) {
console.log("状态",e.target.value)
this.froms.status = e.target.value+1
},
openLine(plan_id){
openLine({id:plan_id}).then(res=>{
this.$functions.sucess("操作成功").then({
},this.getData());
this.$functions.success('操作成功').then(() => {
this.getData()
});
})
},
@ -142,9 +144,9 @@
url: `../stopLine/stopLine?planInfo=${encodeURIComponent(JSON.stringify(item))}`
});
},
offLine(){
offLine(plan_id){
uni.navigateTo({
url: '../offLine/offLine'
url: `../offLine/offLine?plan_id=${plan_id}`
});
},
badProduct(item){
@ -166,9 +168,14 @@
this.$refs.popup.open('center')
},
tjrsBtn(){
this.buttonState = false;
trtj(this.froms).then(res=>{
this.$refs.popup.close('center')
this.$functions.success('提交成功').then(() => {
this.$refs.popup.close('center')
}).catch(res => {
this.buttonState = true;
});
})
}
}

1
pages/stopLine/index.scss

@ -20,6 +20,7 @@
@include fonts(24upx,#999,400);
}
input{
text-align: right;
font-size: 26upx;
}
.next{

9
pages/stopLine/stopLine.vue

@ -41,13 +41,13 @@
</view>
</picker>
</view>
<view class="big-titlt">模具维修</view>
<view class="big-titlt">设备维修</view>
<view class="white-card">
<picker @change="bindmouldIds" :value="froms.device[0].device_id" :range="deviceNo">
<view class="list-list">
<view class="list-title">设备编号</view>
<view class="list-right">
<text>{{deviceNo[froms.device[0].device_id-1]}}</text>
<text>{{deviceNo[froms.device[0].device_id]}}</text>
<image class="next" src="../../static/next.png"></image>
</view>
</view>
@ -86,7 +86,7 @@
<textarea value="" v-model="froms.device[0].remark" placeholder="备注情况说明" />
</view>
</view>
<view class="big-titlt">设备维修</view>
<view class="big-titlt">模具维修</view>
<view class="white-card">
<picker @change="bindmodeIds" :value="froms.mode[0].mode_id" :range="mould">
<view class="list-list">
@ -205,7 +205,6 @@
},
getMode() {
mode().then(res => {
let newArr = []
newArr = res.map(item => item.title)
this.mould = newArr
@ -213,7 +212,7 @@
})
},
getReson() {
stopLineReason().then(res => {
stopLineReason({status:1}).then(res => {
let arr = [];
for (let i in res) {
arr.push(res[i])

2
unpackage/cache/certdata vendored

@ -1,3 +1,3 @@
andrCertfile=D:/HBuilderX.3.1.22.20210709.full/HBuilderX/plugins/app-safe-pack/Test.keystore
andrCertfile=D:/ChromeCoreDownloads/HBuilderX/plugins/app-safe-pack/Test.keystore
andrCertAlias=android
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==

4
unpackage/cache/wgt/__UNI__E896C30/app-service.js vendored

File diff suppressed because one or more lines are too long

2
unpackage/cache/wgt/__UNI__E896C30/app-view.js vendored

File diff suppressed because one or more lines are too long

4
unpackage/dist/build/app-plus/app-service.js vendored

File diff suppressed because one or more lines are too long

2
unpackage/dist/build/app-plus/app-view.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save