订单新增编辑修复

dev_2022-03-03
yujialong 3 years ago
parent 2249fc7dd9
commit 47ded61124
  1. 18
      src/views/order/AddOrder.vue

@ -65,7 +65,7 @@
v-model="form.customerName" placeholder="请选择客户"></el-input> v-model="form.customerName" placeholder="请选择客户"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="orderType" label="订单类型"> <el-form-item prop="orderType" label="订单类型">
<el-select :disabled="viewDisabled||editDisabled||renewDisabled" <el-select :disabled="viewDisabled || renewDisabled"
v-model="form.orderType" clearable placeholder="请选择订单类型"> v-model="form.orderType" clearable placeholder="请选择订单类型">
<el-option v-for="(item,index) in orderTypeList" :key="index" <el-option v-for="(item,index) in orderTypeList" :key="index"
:label="item.name" :value="item.value"></el-option> :label="item.name" :value="item.value"></el-option>
@ -180,7 +180,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" <el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]" @change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]"
v-model="scope.row.finalPrice" v-model="scope.row.finalPrice"
@ -202,7 +202,7 @@
<el-button @click="configure(scope.row)">配置</el-button> <el-button @click="configure(scope.row)">配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120"> <el-table-column label="操作" align="center" width="240">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-c-c"> <div class="flex-c-c">
<el-button <el-button
@ -212,6 +212,7 @@
style="margin-right:10px;" style="margin-right:10px;"
>删除</el-button> >删除</el-button>
<el-switch <el-switch
style="margin-right:10px;"
v-if='dispose || (!editDisabled&&!viewDisabled)' v-if='dispose || (!editDisabled&&!viewDisabled)'
v-model="scope.row.ship" v-model="scope.row.ship"
:active-value="1" :active-value="1"
@ -220,7 +221,7 @@
@change="handleDeliver($event,scope.row)"> @change="handleDeliver($event,scope.row)">
</el-switch> </el-switch>
<el-switch <el-switch
v-show="scope.row.ship && !isAdd && !dispose" v-show="scope.row.ship && editDisabled && !dispose"
:disabled="viewDisabled" :disabled="viewDisabled"
v-model="scope.row.isEnable" v-model="scope.row.isEnable"
:active-value="1" :active-value="1"
@ -317,7 +318,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" <el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]" @change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]"
v-model="scope.row.finalPrice" v-model="scope.row.finalPrice"
@ -339,7 +340,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" <el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled"
onkeyup="value=this.value.replace(/\D+/g,'')" onkeyup="value=this.value.replace(/\D+/g,'')"
oninput="value=value.replace(/[^0-9.]/g,'')" oninput="value=value.replace(/[^0-9.]/g,'')"
v-model="scope.row.accountNum" v-model="scope.row.accountNum"
@ -361,7 +362,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120"> <el-table-column label="操作" align="center" width="240">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-c-c"> <div class="flex-c-c">
<el-button <el-button
@ -371,6 +372,7 @@
style="margin-right:10px;" style="margin-right:10px;"
>删除</el-button> >删除</el-button>
<el-switch <el-switch
style="margin-right:10px;"
v-if='dispose || (!editDisabled&&!viewDisabled)' v-if='dispose || (!editDisabled&&!viewDisabled)'
v-model="scope.row.ship" v-model="scope.row.ship"
:active-value="1" :active-value="1"
@ -379,7 +381,7 @@
@change="handleDeliver($event,scope.row)"> @change="handleDeliver($event,scope.row)">
</el-switch> </el-switch>
<el-switch <el-switch
v-show="scope.row.ship && !isAdd && !dispose" v-show="scope.row.ship && editDisabled && !dispose"
:disabled="viewDisabled" :disabled="viewDisabled"
v-model="scope.row.isEnable" v-model="scope.row.isEnable"
:active-value="1" :active-value="1"

Loading…
Cancel
Save