|
@@ -40,7 +40,7 @@
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
size="small"
|
|
|
- v-if="goodsForm.status > 0 && !(roleName.indexOf('总调度') !== -1) && !(goodsForm.status > 3 && !(roleName.indexOf('车队') !== -1)) || roleName.indexOf('admin') !== -1"
|
|
|
+ v-if="goodsForm.status > 0 && roleName.indexOf('admin') !== -1 || roleName.indexOf('业务员') !== -1 || roleName.indexOf('分管调度') !== -1"
|
|
|
:disabled="
|
|
|
!(roleName.indexOf('业务员') !== -1||roleName.indexOf('分管调度') !== -1||roleName.indexOf('经理') !== -1||roleName.indexOf('部门经理') !== -1||roleName.indexOf('总经理') !== -1) && !(roleName.indexOf('admin') !== -1)"
|
|
|
@click="confirmChange"
|
|
@@ -1043,52 +1043,44 @@ export default {
|
|
|
watch: {
|
|
|
goodsForm: {
|
|
|
handler(newValue, oldValue) {
|
|
|
- this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status === 5
|
|
|
- if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('司机') !== -1){
|
|
|
- this.goodsOptionFormTwo.disabled = true
|
|
|
- } else {
|
|
|
- if (this.goodsForm.status === 0) {
|
|
|
+ if (!this.typeTwo){
|
|
|
+ this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status === 5
|
|
|
+ if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('司机') !== -1){
|
|
|
this.goodsOptionFormTwo.disabled = true
|
|
|
- }else if (this.goodsForm.status === 1){
|
|
|
- this.goodsOptionFormTwo.disabled = false
|
|
|
- if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
|
|
|
- }
|
|
|
- }else if (this.goodsForm.status === 2){
|
|
|
- this.goodsOptionFormTwo.disabled = false
|
|
|
- if (this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
+ if (this.goodsForm.status === 0) {
|
|
|
+ this.goodsOptionFormTwo.disabled = true
|
|
|
+ }else if (this.goodsForm.status === 1){
|
|
|
+ this.goodsOptionFormTwo.disabled = false
|
|
|
+ if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
|
|
|
+ }
|
|
|
+ }else if (this.goodsForm.status === 2){
|
|
|
+ this.goodsOptionFormTwo.disabled = false
|
|
|
+ if (this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
+ }else {
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = true
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = true
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = true
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
+ }
|
|
|
+ }else{
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
}
|
|
|
- }else{
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.typeTwo){
|
|
|
- if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)){
|
|
|
- this.goodsOptionFormTwo.disabled = true
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
- this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2606,19 +2598,29 @@ export default {
|
|
|
confirmChange() {
|
|
|
// validChange({id:this.id}).then(res => {
|
|
|
// if (res.data.data){
|
|
|
- console.log(this.goodsForm.status)
|
|
|
if (this.goodsForm.status === 5){
|
|
|
this.goodsOptionFormC.disabled = false
|
|
|
this.goodsOptionForm.disabled = false
|
|
|
- this.goodsOptionFormTwo.disabled = false
|
|
|
+ this.goodsOptionFormTwo.disabled = true
|
|
|
this.typeTwo = true
|
|
|
this.goodsForm.status = 0
|
|
|
+ if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)){
|
|
|
+ this.goodsOptionFormTwo.disabled = true
|
|
|
+ }
|
|
|
}else {
|
|
|
this.goodsOptionFormC.disabled = false
|
|
|
this.goodsOptionForm.disabled = false
|
|
|
- this.goodsOptionFormTwo.disabled = false
|
|
|
+ // this.goodsOptionFormTwo.disabled = false
|
|
|
this.typeTwo = true
|
|
|
this.goodsForm.status = 0
|
|
|
+ if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)){
|
|
|
+ this.goodsOptionFormTwo.disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
+ this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
|
|
|
+ }
|
|
|
}
|
|
|
// }else {
|
|
|
// this.$message.error('不允许变更')
|