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

26
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>
@ -260,31 +264,27 @@
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,11 +418,11 @@
materialCheckForm(params).then(res => { materialCheckForm(params).then(res => {
this.$functions.success("提交成功").then(() => { this.$functions.success("提交成功").then(() => {
uni.navigateBack() uni.navigateBack()
})
}).catch(res => { }).catch(res => {
this.buttonState = true this.buttonState = true
}) })
}) })
})
} }
} }

20
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>
@ -101,20 +102,19 @@
}, },
methods: { methods: {
getArr() { getArr() {
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);
}, },
getData() { getData() {
let param = { let param = {

Loading…
Cancel
Save