|
@@ -129,37 +129,37 @@
|
|
|
</radio-group>
|
|
</radio-group>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="false">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
|
<view class="tui-title">大单位</view>
|
|
<view class="tui-title">大单位</view>
|
|
|
<input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
|
|
<input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
|
|
|
<view v-if="form.bigUnitId" style="width:300upx;color:#CCCCCC;height:45upx;">{{ bigUnitSelectedData.name }}</view>
|
|
<view v-if="form.bigUnitId" style="width:300upx;color:#CCCCCC;height:45upx;">{{ bigUnitSelectedData.name }}</view>
|
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="showUnitList('big')" style="width:150upx;">修改</button>
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="showUnitList('big')" style="width:150upx;">修改</button>
|
|
|
- <button v-else class="admin-button-com default middle" style="width:150upx;">修改</button>
|
|
|
|
|
|
|
+ <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="false">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
|
<view class="tui-title">小单位</view>
|
|
<view class="tui-title">小单位</view>
|
|
|
<input v-model="form.smallUnitId" name="smallUnitId" type="text" hidden />
|
|
<input v-model="form.smallUnitId" name="smallUnitId" type="text" hidden />
|
|
|
<view v-if="form.smallUnitId" style="width:300upx;color:#CCCCCC;height:45upx;">{{ smallUnitSelectedData.name }}</view>
|
|
<view v-if="form.smallUnitId" style="width:300upx;color:#CCCCCC;height:45upx;">{{ smallUnitSelectedData.name }}</view>
|
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="showUnitList('small')" style="width:150upx;">修改</button>
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="showUnitList('small')" style="width:150upx;">修改</button>
|
|
|
- <button v-else class="admin-button-com default middle" style="width:150upx;">修改</button>
|
|
|
|
|
|
|
+ <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="false" v-if="form.ratioType == 0">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" v-if="form.ratioType == 0" :hover="false">
|
|
|
<view class="tui-title">单位比</view>
|
|
<view class="tui-title">单位比</view>
|
|
|
<input v-model="form.ratio" disabled="true" placeholder-class="phcolor" @click="$msg('不可修改')" style="width:300upx;color:#CCCCCC;"
|
|
<input v-model="form.ratio" disabled="true" placeholder-class="phcolor" @click="$msg('不可修改')" style="width:300upx;color:#CCCCCC;"
|
|
|
class="tui-input" name="ratio" placeholder="1扎=20支,请填写20" maxlength="50" type="number" />
|
|
class="tui-input" name="ratio" placeholder="1扎=20支,请填写20" maxlength="50" type="number" />
|
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="changeRatio()" style="width:150upx;">修改</button>
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="changeRatio()" style="width:150upx;">修改</button>
|
|
|
- <button v-else class="admin-button-com default middle" style="width:150upx;">修改</button>
|
|
|
|
|
|
|
+ <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="false">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
|
<view class="tui-title">每扎重量</view>
|
|
<view class="tui-title">每扎重量</view>
|
|
|
<input v-model="form.weight" disabled="true" placeholder-class="phcolor" @click="$msg('不可修改')" style="width:300upx;color:#CCCCCC;"
|
|
<input v-model="form.weight" disabled="true" placeholder-class="phcolor" @click="$msg('不可修改')" style="width:300upx;color:#CCCCCC;"
|
|
|
class="tui-input" name="weight" placeholder="单位为公斤" maxlength="50" type="digit" />
|
|
class="tui-input" name="weight" placeholder="单位为公斤" maxlength="50" type="digit" />
|
|
|
|
|
|
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="changeWeight()" style="width:150upx;">修改</button>
|
|
<button v-if="productData.id > 0 && productData.hasRightChange == 1" class="admin-button-com blue middle" @click.stop="changeWeight()" style="width:150upx;">修改</button>
|
|
|
- <button v-else class="admin-button-com default middle" style="width:150upx;">修改</button>
|
|
|
|
|
|
|
+ <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -532,6 +532,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ notAllowChange(){
|
|
|
|
|
+ if(this.productData.hasRightChangeReason!=''){
|
|
|
|
|
+ this.$msg(this.productData.hasRightChangeReason)
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$msg('未知原因造成不可修改')
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
setNewUnit(item){
|
|
setNewUnit(item){
|
|
|
modifyUnit({type:this.modifyUnitType,unitId:item.id,id:this.productData.id}).then(res=>{
|
|
modifyUnit({type:this.modifyUnitType,unitId:item.id,id:this.productData.id}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|