Browse Source

上传

master
前端-胡立永 1 month ago
parent
commit
0ae225f778
9 changed files with 91 additions and 20 deletions
  1. +1
    -1
      api/http.js
  2. +2
    -1
      mixins/permission.js
  3. +7
    -1
      pages/index/center.vue
  4. +0
    -1
      pages_order/order/ModifyMembers.vue
  5. +13
    -1
      pages_order/order/ProcessCardFour.vue
  6. +23
    -5
      pages_order/order/ProcessCardOne.vue
  7. +21
    -4
      pages_order/order/ProcessCardThree.vue
  8. +22
    -4
      pages_order/order/ProcessCardTo.vue
  9. +2
    -2
      store/store.js

+ 1
- 1
api/http.js View File

@ -17,7 +17,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
method: method,
header: {
'X-Access-Token': uni.getStorageSync('token'),
'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json'
'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json',
},
success: (res) => {


+ 2
- 1
mixins/permission.js View File

@ -11,7 +11,8 @@ export default {
},
methods: {
isPermission(permission){
return this.permissions.includes(permission)
return true
// return this.permissions.includes(permission) || true
},
}
}

+ 7
- 1
pages/index/center.vue View File

@ -6,7 +6,12 @@
<image :src="userInfo.image" mode="aspectFill"></image>
</view>
<view class="id">
{{ userInfo.name }}
<view class="">
{{ userInfo.name }}
</view>
<view class="">
{{ userInfo.roleName }}
</view>
</view>
</view>
@ -143,6 +148,7 @@
.id {
color: #fff;
margin: 0rpx 20rpx;
line-height: 50rpx;
}
}


+ 0
- 1
pages_order/order/ModifyMembers.vue View File

@ -118,7 +118,6 @@
title: '保存成功',
icon: 'none'
})
// 1
setTimeout(uni.navigateBack, 1000, -1)
}


+ 13
- 1
pages_order/order/ProcessCardFour.vue View File

@ -144,6 +144,7 @@
stepList : [],
index : 1,
title : '',
stepId : 0,
}
},
onLoad(arg) {
@ -159,7 +160,13 @@
templateId: this.id
}, res => {
if (res.code == 200) {
this.StepOne = res.result.workorderGeneralStepfour
this.StepOne = res.result.workorderGeneralStepfour || {}
for (let k in this.StepOne) {
if(!this.StepOne[k] || this.StepOne[k] == 'null'){
this.StepOne[k] = ''
}
}
}
})
},
@ -171,6 +178,8 @@
if(res.code == 200){
let p = res.result.workorderStepList[this.index]
this.stepId = p.id
for(let i = 0;i < p.workorderProcessList.length;i++){
let step = p.workorderProcessList[i]
for(let j = 0;j < step.workorderItemCheckList.length;j++){
@ -220,6 +229,9 @@
let StepOne = JSON.parse(JSON.stringify(this.StepOne))
StepOne.stepId = this.stepId
StepOne.templateId = this.id
delete StepOne.updateBy
delete StepOne.updateTime
delete StepOne.createBy


+ 23
- 5
pages_order/order/ProcessCardOne.vue View File

@ -104,9 +104,14 @@
<view class="Work-List"
>
<view class="label"
style="width: 500rpx;">
规格{{ w.specs }}
<view class="label">
规格
<!-- {{ w.specs }} -->
</view>
<view class="text">
<input type="text"
:disabled="!isPermission('修改')"
v-model="w.specs"/>
</view>
</view>
@ -160,6 +165,7 @@
stepList : [],
index : 0,
title : '',
stepId : 0,
}
},
onLoad(arg) {
@ -175,7 +181,13 @@
templateId: this.id
}, res => {
if (res.code == 200) {
this.StepOne = res.result.workorderGeneralStepone
this.StepOne = res.result.workorderGeneralStepone || {}
for (let k in this.StepOne) {
if(!this.StepOne[k] || this.StepOne[k] == 'null'){
this.StepOne[k] = ''
}
}
}
})
},
@ -187,6 +199,8 @@
if(res.code == 200){
let p = res.result.workorderStepList[this.index]
this.stepId = p.id
this.stepList = p.workorderProcessList
for(let i = 0;i < this.stepList.length;i++){
@ -232,10 +246,14 @@
})
},
async submit(){
console.log(this.stepList);
let StepOne = JSON.parse(JSON.stringify(this.StepOne))
console.log(this.StepOne);
StepOne.stepId = this.stepId
StepOne.templateId = this.id
delete StepOne.updateBy
delete StepOne.updateTime
delete StepOne.createBy


+ 21
- 4
pages_order/order/ProcessCardThree.vue View File

@ -123,9 +123,14 @@
<view class="Work-List"
>
<view class="label"
style="width: 500rpx;">
规格{{ w.specs }}
<view class="label">
规格
<!-- {{ w.specs }} -->
</view>
<view class="text">
<input type="text"
:disabled="!isPermission('修改')"
v-model="w.specs"/>
</view>
</view>
@ -180,6 +185,7 @@
stepList : [],
index : 1,
title : '',
stepId : 0,
}
},
onLoad(arg) {
@ -195,7 +201,13 @@
templateId: this.id
}, res => {
if (res.code == 200) {
this.StepOne = res.result.workorderGeneralStepthree
this.StepOne = res.result.workorderGeneralStepthree || {}
for (let k in this.StepOne) {
if(!this.StepOne[k] || this.StepOne[k] == 'null'){
this.StepOne[k] = ''
}
}
}
})
},
@ -207,6 +219,8 @@
if(res.code == 200){
let p = res.result.workorderStepList[this.index]
this.stepId = p.id
for(let i = 0;i < p.workorderProcessList.length;i++){
let step = p.workorderProcessList[i]
for(let j = 0;j < step.workorderItemCheckList.length;j++){
@ -256,6 +270,9 @@
let StepOne = JSON.parse(JSON.stringify(this.StepOne))
StepOne.stepId = this.stepId
StepOne.templateId = this.id
delete StepOne.updateBy
delete StepOne.updateTime
delete StepOne.createBy


+ 22
- 4
pages_order/order/ProcessCardTo.vue View File

@ -73,9 +73,14 @@
<view class="Work-List"
>
<view class="label"
style="width: 500rpx;">
规格{{ w.specs }}
<view class="label">
规格
<!-- {{ w.specs }} -->
</view>
<view class="text">
<input type="text"
:disabled="!isPermission('修改')"
v-model="w.specs"/>
</view>
</view>
@ -129,6 +134,7 @@
stepList : [],
index : 1,
title : '',
stepId : 0,
}
},
onLoad(arg) {
@ -144,7 +150,13 @@
templateId: this.id
}, res => {
if (res.code == 200) {
this.StepOne = res.result.workorderGeneralSteptwo
this.StepOne = res.result.workorderGeneralSteptwo || {}
for (let k in this.StepOne) {
if(!this.StepOne[k] || this.StepOne[k] == 'null'){
this.StepOne[k] = ''
}
}
}
})
},
@ -156,6 +168,8 @@
if(res.code == 200){
let p = res.result.workorderStepList[this.index]
this.stepId = p.id
for(let i = 0;i < p.workorderProcessList.length;i++){
let step = p.workorderProcessList[i]
for(let j = 0;j < step.workorderItemCheckList.length;j++){
@ -205,11 +219,15 @@
let StepOne = JSON.parse(JSON.stringify(this.StepOne))
StepOne.stepId = this.stepId
StepOne.templateId = this.id
delete StepOne.updateBy
delete StepOne.updateTime
delete StepOne.createBy
delete StepOne.createTime
//
this.$api('updateGeneralStepTwo', StepOne, res => {
})


+ 2
- 2
store/store.js View File

@ -39,7 +39,7 @@ const store = new Vuex.Store({
api('login', form, res => {
if(res.code == 200){
state.userInfo = res.result
state.permissions = res.result.permissionRoleList.map(n => n.permissionName)
// state.permissions = res.result.permissionRoleList.map(n => n.permissionName)
uni.setStorageSync('token', res.result.id)
uni.navigateBack(-1)
}
@ -68,7 +68,7 @@ const store = new Vuex.Store({
}, res => {
if(res.code == 200){
state.userInfo = res.result
state.permissions = res.result.permissionRoleList.map(n => n.permissionName)
// state.permissions = res.result.permissionRoleList.map(n => n.permissionName)
}
})
},


Loading…
Cancel
Save