Commit 3b3f7c31 authored by youjie's avatar youjie

223 禁止编辑 费用项

parent f19037ea
......@@ -545,7 +545,7 @@
<th width="88">{{$t('fnc.bweibi')}}</th>
</tr>
<template v-for="(da,daIn) in msg.detailList">
<tr v-if="!da.show" @click="showEdit(daIn)" class="_color_b">
<tr v-if="!da.show" @click="!da.OffEditExpeItem?showEdit(daIn):''" class="_color_b">
<td height="26px">{{da.CostTypeName}}</td>
<td height="26px">{{da.Number}}</td>
<td height="26px">{{da.UnitPriceTo}}</td>
......@@ -553,10 +553,11 @@
<td height="26px">{{da.yTotalPriceTo}}</td>
<td height="26px">{{da.Rate}}</td>
<td height="26px">{{da.bTotalPriceTo}}</td>
<td height="26px">{{da.Remark}}</td>
<td height="26px" @click.stop="showEdit(daIn)">{{da.Remark}}</td>
</tr>
<tr class="addList2" v-else @keyup.enter="addList(2,daIn+1)">
<td height="26px">
<el-form :disabled="da.OffEditExpeItem">
<el-select filterable v-model='da.CostTypeId' ref='CostTypeId' :placeholder="$t('rule.qxzfyshuoming')"
@change="getCostTypeName(da.CostTypeId, daIn),getRate(da.CostTypeId,da.CurrencyId,2,daIn),addList(2,daIn+1)"
class=" _border_b_1">
......@@ -565,6 +566,8 @@
:disabled="SelectState">
</el-option>
</el-select>
</el-form>
</td>
<!-- return( /[\d]/.test(String.fromCharCode(evt.which?evt.which:window.event.keyCode))) -->
<!-- <td height="26px"><el-input v-model="da.Number" type="text" onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' @blur="addList(2,daIn+1)" @change="Calculation(2,daIn+1)" class="w80 _border_b_1"></el-input></td>
......@@ -572,40 +575,54 @@
<input v-model="da.UnitPrice" type="text" @keydown="handleInput2" @blur="addList(2,daIn+1)" @change="Calculation(2,daIn+1)" class="w80 h34 _border_b_1"></input>
</td> -->
<td height="26px">
<el-form :disabled="da.OffEditExpeItem">
<el-input v-model="da.Number" @keyup.native="checkInteger(da,'Number')" @input="chages($event)"
:disabled="daIn === 0 && XSTC" type="text" @blur="addList(2,daIn+1)" @change="Calculation(2,daIn+1)"
class="w80 _border_b_1"></el-input>
</el-form>
</td>
<td height="26px">
<el-form :disabled="da.OffEditExpeItem">
<el-input v-model="da.UnitPrice" @input="chages($event)" type="text"
:disabled="((msg.TemplateId == 43 || msg.TemplateId == 48 || msg.TemplateId == 56 || msg.TemplateId == 53) && !ZhuiJiaTK) || (daIn === 0 && XSTC)"
@keyup.native="checkPrice(da,'UnitPrice',true)" @blur="addList(2,daIn+1)"
@change="Calculation(2,daIn+1)" class="w80 h34 _border_b_1"></el-input>
</el-form>
</td>
<td height="26px">
<el-form :disabled="da.OffEditExpeItem">
<el-select filterable :disabled="detailCurrDis || (daIn === 0 && XSTC)" v-model='da.CurrencyId'
:placeholder="$t('rule.qxzbzhong')"
@change="getRate(da.CostTypeId,da.CurrencyId,2,daIn),addList(2,daIn+1)" class=" _border_b_1">
<el-option v-for='item in coinGetList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form>
</td>
<td height="26px">{{da.yTotalPrice}}</td>
<!-- @blur="addList(2,daIn+1)" @change="Calculation(2,daIn+1)" -->
<td height="26px">
<el-form :disabled="da.OffEditExpeItem">
<el-input v-model="da.Rate" type="text" :disabled="true" class="w80 _border_b_1"></el-input>
</el-form>
</td>
<td height="26px">{{da.bTotalPrice}}</td>
<td height="26px">
<el-input v-model="da.Remark" type="textarea" class="w80 _border_b_1" @input="chages($event)">
</el-input> <i @click="deleteRow(daIn,da)" class="_delete_row iconfont icon-img_delete_small"></i>
</el-input>
<i @click="deleteRow(daIn,da)" class="_delete_row iconfont icon-img_delete_small"></i>
</td>
</tr>
</template>
<tr class="addList1" @keyup.enter="addList(1)">
<td>
<el-form :disabled="OffEditExpeItem">
<el-select v-if="!SelectState" filterable v-model='detailList.CostTypeId' ref='CostTypeId'
:placeholder="$t('rule.qxzfyshuoming')"
@change="getCostTypeName(detailList.CostTypeId), getRate(detailList.CostTypeId,detailList.CurrencyId,1),addList(1)"
......@@ -622,6 +639,7 @@
:disabled="SelectState">
</el-option>
</el-select>
</el-form>
</td>
<!-- <td>
<el-input v-model="detailList.Number" type="text" onkeypress='return( /[\d]/.test(String.fromCharCode(event.keyCode)))' @blur="addList(1)" @change="Calculation(1)" class="w80 _border_b_1"></el-input>
......@@ -630,36 +648,54 @@
<input v-model="detailList.UnitPrice" type="text" @keydown="handleInput2" @blur="addList(1)" @change="Calculation(1)" class="w80 h34 _border_b_1"></input>
</td> -->
<td>
<el-form :disabled="OffEditExpeItem">
<el-input v-model="detailList.Number" type="text" @keyup.native="checkInteger(detailList,'Number')"
@blur="addList(1)" @change="Calculation(1)" class="w80 _border_b_1"></el-input>
</el-form>
</td>
<td>
<el-form :disabled="OffEditExpeItem">
<el-input v-model="detailList.UnitPrice" type="text"
@keyup.native="checkPrice(detailList,'UnitPrice',true)" @blur="addList(1)" @change="Calculation(1)"
:disabled="(msg.TemplateId == 43 || msg.TemplateId == 48 || msg.TemplateId == 56 || msg.TemplateId == 53) && !ZhuiJiaTK"
class="w80 h34 _border_b_1"></el-input>
</el-form>
</td>
<td>
<el-form :disabled="OffEditExpeItem">
<el-select filterable v-model='detailList.CurrencyId' :placeholder="$t('rule.qxzbzhong')"
@change="getRate(detailList.CostTypeId,detailList.CurrencyId,1),addList(1),Calculation(1)"
class=" _border_b_1">
<el-option v-for='item in coinGetList' :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form>
</td>
<td>
<el-form :disabled="OffEditExpeItem">
<span
v-if="detailList.yTotalPrice && detailList.yTotalPrice!=''">{{detailList.yTotalPrice.toFixed(2)}}</span>
<span v-else>{{detailList.yTotalPrice}}</span>
</el-form>
</td>
<!-- @blur="addList(1)" @change="Calculation(1)" -->
<td>
<el-form :disabled="OffEditExpeItem">
<el-input v-model="detailList.Rate" type="text" :disabled="true" class="w80 _border_b_1"></el-input>
</el-form>
</td>
<td>{{detailList.bTotalPrice}}</td>
<td>
<el-form :disabled="OffEditExpeItem">
<el-input v-model="detailList.Remark" type="textarea" @blur="addList(1)" @input="chages($event)"
class="w80 _border_b_1"></el-input>
</el-form>
</td>
</tr>
<tr v-if="msg.detailList.length<2">
......@@ -1053,6 +1089,7 @@
export default {
data() {
return {
OffEditExpeItem: false,
isDepositCustomer: false,
ContractCustomer: null,
DepositCustomer: null,
......@@ -1464,6 +1501,7 @@
);
},
deleteRow(i, obj) {
if(obj.OffEditExpeItem) return
obj.show = false;
this.msg.Description = this.Description;
this.msg.detailList.splice(i, 1);
......@@ -2427,6 +2465,12 @@
if (res.data.resultCode == 1) {
let data = res.data.data;
let arrList = function(list){
list.forEach(x=>{
x.OffEditExpeItem = false
})
}
arrList(data.DetailList)
this.$forceUpdate()
this.editTemplateId = data.TemplateId;
this.getCompany();
......@@ -2493,6 +2537,10 @@
let allPrice = 0
let yballPrice = 0
data.DetailList.forEach(x => {
if(data.OtherType==87&&data.TemplateId==126&&x.CostTypeId==223) {
x.OffEditExpeItem = true
this.OffEditExpeItem = true
}
// 20190815 新增领款单据重新生成自动带上计算后的金额
x.UnitPrice = this.$route.query.dijieEditMoney ? this.$route.query.dijieEditMoney : x.UnitPrice
x.OriginalMoney = this.$route.query.dijieEditMoney ? this.$route.query.dijieEditMoney : x
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment