huangli865118801 4 years ago
parent
commit
9ef34a381e
  1. 34
      pages/rawMaterialInfo/rawMaterialInfo.vue
  2. 32
      pages/stampingInspectionList/stampingInspectionList.vue

34
pages/rawMaterialInfo/rawMaterialInfo.vue

@ -14,6 +14,10 @@
<view>规格型号:</view> <view>规格型号:</view>
<text>{{CyInfo.spec}}</text> <text>{{CyInfo.spec}}</text>
</view> </view>
<view class="contet-up-card-cont-list">
<view>检验员:</view>
<text>{{userInfo.name}}</text>
</view>
<picker @change="bindDetectionMode" :value="detectionModeIndex" :range="detectionMode"> <picker @change="bindDetectionMode" :value="detectionModeIndex" :range="detectionMode">
<view class="contet-up-card-cont-list"> <view class="contet-up-card-cont-list">
<view>检测方式:</view> <view>检测方式:</view>
@ -190,7 +194,7 @@
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" @tap="submit" :disabled="buttonState==false?true:false" <button type="primary" @tap="submit" :disabled="buttonState==false?true:false"
v-if="!check_status&&isMenu('原材料提交')">提交</button> v-if="check_status==null&&isMenu(29)">提交</button>
</view> </view>
</view> </view>
</view> </view>
@ -259,32 +263,28 @@
this.getitem() this.getitem()
this.getArr() this.getArr()
this.isMenu(); this.isMenu();
console.log('检验项', this.userInfo) console.log('检验项', this.CyInfo)
}, },
methods: { methods: {
getArr() { getArr() {
if (this.power.length > 0) { if (this.power.length > 0) {
let newArr = this.power.map(item => { let newArr = this.power.map(item => {
if (item.children) { this.jurisdiction.push(item.id)
item.children.map(items => {
this.jurisdiction.push(items.title)
return items
})
}
}) })
} }
console.log("xinshuzu", this.jurisdiction)
console.log("xinshuzu", this.jurisdiction)
}, },
isMenu(title) { isMenu(id) {
return this.jurisdiction.includes(title); console.log("id",id)
return this.jurisdiction.includes(id);
}, },
getitem() { getitem() {
materialItem({ materialItem({
name: this.CyInfo.purchase_number name: this.CyInfo.title
}).then(res => { }).then(res => {
this.itemList = res.item; this.itemList = res.item;
this.standard = res.standard; this.standard = res.standard;
@ -418,9 +418,9 @@
materialCheckForm(params).then(res => { materialCheckForm(params).then(res => {
this.$functions.success("提交成功").then(() => { this.$functions.success("提交成功").then(() => {
uni.navigateBack() uni.navigateBack()
}).catch(res => {
this.buttonState = true
}) })
}).catch(res => {
this.buttonState = true
}) })
}) })

32
pages/stampingInspectionList/stampingInspectionList.vue

@ -42,7 +42,8 @@
<view @tap="firstInspectionInfo(item.id,item)"> <view @tap="firstInspectionInfo(item.id,item)">
查看详情 查看详情
</view> </view>
<view class="red" @tap="firstInspectionInfoSh(item.id,item)" v-if="isMenu('冲压审核')&&item.two_id==0"> <view class="red" @tap="firstInspectionInfoSh(item.id,item)"
v-if="isMenu(36)&&item.two_id==0">
审核 审核
</view> </view>
</view> </view>
@ -56,7 +57,7 @@
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" v-if="isMenu('冲压提交')" @tap="addRecord()">新增巡检记录</button> <button type="primary" v-if="isMenu(31)" @tap="addRecord()">新增巡检记录</button>
</view> </view>
</view> </view>
</view> </view>
@ -78,7 +79,7 @@
info: {}, info: {},
power: [], power: [],
jurisdiction: [], jurisdiction: [],
product_id:0, product_id: 0,
list: [], list: [],
limit: 10, limit: 10,
page: 1 page: 1
@ -94,27 +95,26 @@
onLoad(e) { onLoad(e) {
this.plan_id = e.plan_id; this.plan_id = e.plan_id;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo)); this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.product_id=this.CyInfo.product_id; this.product_id = this.CyInfo.product_id;
this.power = this.userInfo.power this.power = this.userInfo.power
this.getArr(); this.getArr();
this.isMenu(); this.isMenu();
}, },
methods: { methods: {
getArr() { getArr() {
let newArr = this.power.map(item => { if (this.power.length > 0) {
if (item.children) { let newArr = this.power.map(item => {
this.jurisdiction.push(item.id)
item.children.map(items => { })
this.jurisdiction.push(items.title)
return items
})
}
}) }
console.log("xinshuzu", this.jurisdiction) console.log("xinshuzu", this.jurisdiction)
}, },
isMenu(title) { isMenu(id) {
return this.jurisdiction.includes(title); console.log("id", id)
return this.jurisdiction.includes(id);
}, },
getData() { getData() {
let param = { let param = {
@ -136,7 +136,7 @@
complete: () => {} complete: () => {}
}); });
}, },
firstInspectionInfo(id,type) { firstInspectionInfo(id, type) {
uni.navigateTo({ uni.navigateTo({
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`, url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`,
success: res => {}, success: res => {},
@ -144,7 +144,7 @@
complete: () => {} complete: () => {}
}); });
}, },
firstInspectionInfoSh(id,type) { firstInspectionInfoSh(id, type) {
uni.navigateTo({ uni.navigateTo({
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&&type=3&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}`, url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&&type=3&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}`,
success: res => {}, success: res => {},

Loading…
Cancel
Save