Browse Source

提交

master
865118801@qq.com 4 years ago
parent
commit
4664957895
  1. 69
      pages/rawMaterialInfo/rawMaterialInfo.vue
  2. 10
      pages/tcqInfo/index.scss
  3. 63
      pages/tcqInfo/tcqInfo.vue

69
pages/rawMaterialInfo/rawMaterialInfo.vue

@ -64,7 +64,7 @@
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(index)">点击查看</text>
<!-- <text class="check-btn" @tap="checkBtn(index)">点击查看</text> -->
</view>
<view class="cybz-card">
{{item.standard}}
@ -111,7 +111,8 @@
placeholder="请输入抽检结果"></textarea>
</view>
<view class="submit-btn">
<button type="primary" @tap="submit" :disabled="buttonState==false?true:false" v-if="!check_status">提交</button>
<button type="primary" @tap="submit" :disabled="buttonState==false?true:false"
v-if="!check_status">提交</button>
</view>
</view>
</view>
@ -127,10 +128,10 @@
export default {
data() {
return {
info:{},
info: {},
itemList: [],
result: ["合格", "不合格"],
resltIds:0,
resltIds: 0,
detectionMode: ["全检", "抽检"],
detectionModeIndex: 0,
determine: ["合格", "不合格"],
@ -144,6 +145,7 @@
check_status: 0,
jyxItem: {},
buttonState: true,
standard: {},
froms: {
result: 1,
purchase_id: '', //ID
@ -172,15 +174,14 @@
this.type = this.CyInfo.examine_status
this.check_status = this.CyInfo.m_id
this.getitem()
if (this.check_status) {
this.getInfo()
}
console.log('检验项', this.jyxItem)
},
methods: {
getitem() {
materialItem().then(res => {
this.itemList = res.item;
this.standard = res.standard;
for (let b in res.item) {
this.item.push({
check_item: res.item[b],
@ -193,20 +194,42 @@
})
}
if (this.check_status) {
this.getInfo()
}
})
},
getInfo() {
rawFormDetail({
purchase_id: this.CyInfo.id
}).then(res => {
this.info=res
this.item=this.info.item;
this.froms.dimensional_inspection=this.info.dimensional_inspection
this.froms.order_no=this.info.data.order_no
this.froms.arrival_quantity=this.info.data.arrival_quantity
this.froms.number_of_inspections=this.info.data.number_of_inspections
this.resltIds=this.info.data.result-1
console.log("原材料检验详情",res)
this.info = res
this.item = this.info.item.map(item => {
for (let b in this.standard) {
if (b == item.check_item) {
item.standard = this.standard[b];
break;
}
}
for (let b in this.itemList) {
if (b == item.check_item) {
item.check_item = this.itemList[b];
break;
}
}
return item;
})
this.froms.dimensional_inspection = this.info.dimensional_inspection
this.froms.order_no = this.info.data.order_no
this.froms.arrival_quantity = this.info.data.arrival_quantity
this.froms.number_of_inspections = this.info.data.number_of_inspections
this.resltIds = this.info.data.result - 1
console.log("原材料检验详情", res)
})
},
bindDetectionMode: function(e) {
@ -234,14 +257,14 @@
this.froms.purchase_id = this.CyInfo.id;
this.froms.check_type = this.detectionModeIndex + 1
this.froms.item = this.item;
this.froms.result=this.resltIds+1;
this.froms.result = this.resltIds + 1;
this.item.map(item => {
delete item.check;
delete item.standard
})
let params=JSON.parse(JSON.stringify(this.froms));
let params = JSON.parse(JSON.stringify(this.froms));
params.item = params.item.map(item => {
@ -255,17 +278,17 @@
return item;
})
this.buttonState=false
this.$functions.confirm("是否进行此操作?").then(()=>{
this.buttonState = false
this.$functions.confirm("是否进行此操作?").then(() => {
materialCheckForm(params).then(res => {
this.$functions.success("提交成功").then(() => {
uni.navigateBack().catch(res=>{
this.buttonState=true
uni.navigateBack().catch(res => {
this.buttonState = true
})
})
})
})
}
}
}

10
pages/tcqInfo/index.scss

@ -434,16 +434,16 @@
.tx-ul{
width: 710upx;
@include flex(center,space-bteween);
@include flex(center,space-between);
.tx-title{
width: 500upx;
width: 200upx;
@include fonts(24upx,#666,400);
}
.tx-in-nav{
width: 200upx;
@include flex(center,space-bteween);
width:500upx;
@include flex(center,space-between);
input{
width: 100upx;
//width: 200upx;
padding: 20upx;
border: 1upx solid #F1F1F1;
font-size: 24upx;

63
pages/tcqInfo/tcqInfo.vue

@ -41,7 +41,7 @@
<view class="content-box-card-title">检测员:</view>
<text>{{ info ? info.name : '' }}</text>
</view>
<!-- <view class="content-box-card-list">
<!-- <view class="content-box-card-list">
<view class="content-box-card-title">生产数量:</view>
<input type="number" v-if="type==1" v-model="froms.product_number" />
<input type="number" v-else disabled="false" v-model="info.product_number" />
@ -53,7 +53,7 @@
<input type="number" v-if="type==1" v-model="froms.no_number" />
<input type="number" v-else disabled="false" v-model="info.no_number" />
</view> -->
<!-- <view class="content-box-card-list">
<view class="content-box-card-title">报废数:</view>
<input type="number" v-if="type==1" v-model="froms.scrap" />
@ -68,7 +68,7 @@
<view v-for="(value, idx) in item.check_conf_msg" :key="idx" class="cyxj-content">
<view class="cyxj-content-card" v-if="item.check_conf_msg[idx].status == 1">
<view class="xx-card">
<view class="xx-title">{{ value.title }}</view>
<view class="xx-title">规格:{{ value.spec }}</view>
<view class="xx-ul">
<view class="xx-list" v-for="(va, i) in ifcomplete" :key="i" @tap="value.choice = va">
<image :src="va == value.choice ? '../../static/xz.png' : '../../static/wxz.png'"
@ -90,10 +90,11 @@
</view>
<view class="cyxj-content-card" v-else>
<view class="tx-ul">
<view class="tx-title">{{ value.title }}</view>
<view class="xx-title" style="font-size: 26upx;">规格:{{ value.spec }}</view>
<view class="tx-in-nav">
<view>{{value.bottom}}</view>
<input :class="value.inputState==false?'re-bor':''" :disabled="type==2?true:false" type="number" @input="inputListener($event,index, idx)" v-model="value.input"
<input :class="value.inputState==false?'re-bor':''" :disabled="type==2?true:false"
type="number" @input="inputListener($event,index, idx)" v-model="value.input"
placeholder="请输入" />
<view>{{value.top}}</view>
</view>
@ -106,7 +107,7 @@
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">最终判定:</view>
<view class="right-check" >
<view class="right-check">
<view class="check-list" v-if="type==1" v-for="(item,index) in ifQualified" :key="index"
@tap="ifQualifiedChange(index+1)">
<image :src="froms.result==index+1?'../../static/xz.png':'../../static/wxz.png'">
@ -119,13 +120,14 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cyxj-content" style="margin-top: 24upx;">
<view class="bzqk-card"><textarea v-model="froms.remake" placeholder="备注情况说明" /></view>
<view class="bzqk-card"><textarea v-model="froms.remake" placeholder="备注情况说明" /></view>
<view class="submit-btn">
<button v-if="type==1" type="primary" :disabled="buttonState==false?true:false" @tap="submits">提交</button>
<button v-if="type==1" type="primary" :disabled="buttonState==false?true:false"
@tap="submits">提交</button>
<button v-if="type==3" @tap="applys()" type="primary">审核</button>
</view>
</view>
@ -162,7 +164,7 @@
CyInfo: {},
info: {},
froms: {
result:0,
result: 0,
item: [],
plan_id: '',
//model: '',
@ -181,7 +183,7 @@
},
computed: {
...mapGetters(['userInfo', 'roleType'])
},
onLoad(e) {
this.type = e.type;
@ -193,16 +195,18 @@
//this.froms.model = this.CyInfo.product_size;
this.power = this.userInfo.power
this.getArr();
if (this.type != 1) {
this.getInfo();
} else {
this.getConfig();
}
bad({}).then(res => {
for (let b in res) {
this.methList.push(res[b]);
}
});
this.getConfig();
},
methods: {
ifQualifiedChange(index) {
@ -211,13 +215,13 @@
getArr() {
let newArr = this.power.map(item => {
if (item.children) {
item.children.map(items => {
this.jurisdiction.push(items.title)
return items
})
}
})
console.log("xinshuzu", this.jurisdiction)
},
@ -231,8 +235,7 @@
} else {
if (item.input < item.bottom || item.input > item.top) {
this.configSet[index].check_conf_msg[idx].inputState = false;
}
else {
} else {
this.configSet[index].check_conf_msg[idx].inputState = true;
}
}
@ -242,10 +245,10 @@
product_id: this.CyInfo.product_id
}).then(res => {
this.configSet = res.map(item => {
item.check_conf_msg = item.check_conf_msg.map(value => {
item.check_conf_msg = item.product_tcq_conf.map(value => {
return this.matchingConfig(value);
});
item.title = item.status_name;
return item;
});
});
@ -258,8 +261,8 @@
value.inputState = true;
let CheckCyMsg = this.info.CheckTcqMsg ? this.info.CheckTcqMsg : [];
for (let b in CheckCyMsg) {
if (CheckCyMsg[b].check_tcq_id == value.id) {
let json = JSON.parse(CheckCyMsg[b].json);
let json = JSON.parse(CheckCyMsg[b].json);
if (json.check_tcq_id == value.id) {
value.choice = json.choice;
value.content = json.content;
value.situation = json.situation;
@ -275,22 +278,23 @@
tcqCheckDetail({
plan_id: this.pId,
id: this.id,
product_id:this.productId
product_id: this.productId
}).then(res => {
this.info = res;
this.froms.plan_id = this.pId;
this.froms.model = res.model;
this.froms.frequency = res.frequency;
this.froms.remake = res.remake;
this.getConfig();
});
},
bindline: function(e) {
this.froms.frequency = e.target.value;
},
pickerChange(e, index, idx) {
this.configSet[index].check_conf_msg[idx].situation = this.methList[e.detail.value];
},
submits() {
@ -318,14 +322,15 @@
choice: items.choice,
content: items.content,
situation: items.situation,
input: items.input
input: items.input,
check_tcq_id: items.id
}
});
}
}
this.buttonState = false;
this.$functions.confirm("是否进行此操作?").then(()=>{
this.$functions.confirm("是否进行此操作?").then(() => {
tcqCheckAdd(this.froms).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack();
@ -334,14 +339,14 @@
});
});
})
},
applys() {
this.$functions.confirm('是否确定操作?').then(res => {
tcqCheckSure({
plan_id: this.info.plan_id,
play_id: this.info.play_id,
id:this.info.id
id: this.info.id
}).then(res => {
this.$functions.success('操作成功').then(() => {
uni.navigateBack({});
@ -354,5 +359,5 @@
</script>
<style lang="scss">
@import './index.scss';
@import './index.scss';
</style>

Loading…
Cancel
Save