|
@@ -25,10 +25,10 @@ |
|
|
<l-select @input="setValue('FundsApply.IsFixedAssets', $event)" |
|
|
<l-select @input="setValue('FundsApply.IsFixedAssets', $event)" |
|
|
:value="getValue('FundsApply.IsFixedAssets')" :range="dataSource.FundsApply.IsFixedAssets" |
|
|
:value="getValue('FundsApply.IsFixedAssets')" :range="dataSource.FundsApply.IsFixedAssets" |
|
|
title="是否固定资产" :disabled="!edit" /> <!-- v-if="!edit" --> |
|
|
title="是否固定资产" :disabled="!edit" /> <!-- v-if="!edit" --> |
|
|
<!-- <l-textarea @input="setValue('FundsApply.Remark', $event)" :value="getValue('FundsApply.Remark')" title="备注" |
|
|
|
|
|
:readonly="!edit" /> --> <!-- v-if="!edit" :readonly="!edit" --> |
|
|
|
|
|
<l-input @input="setValue('FundsApply.Remark', $event)" :value="getValue('FundsApply.Remark')" |
|
|
|
|
|
title="申请人" :disabled="!edit" /> |
|
|
|
|
|
|
|
|
<l-textarea @input="setValue('FundsApply.Remark', $event)" :value="getValue('FundsApply.Remark')" title="备注" |
|
|
|
|
|
:readonly="!edit" /> <!-- v-if="!edit" :readonly="!edit" --> |
|
|
|
|
|
<!-- <l-input @input="setValue('FundsApply.Remark', $event)" :value="getValue('FundsApply.Remark')" |
|
|
|
|
|
title="申请人" :disabled="!edit" /> --> |
|
|
<l-input @input="Statusitem(setValue('FundsApply.Status', $event)) " |
|
|
<l-input @input="Statusitem(setValue('FundsApply.Status', $event)) " |
|
|
:value="Statusitem(getValue('FundsApply.Status'))" title="审批状态" disabled v-if="!edit" /> |
|
|
:value="Statusitem(getValue('FundsApply.Status'))" title="审批状态" disabled v-if="!edit" /> |
|
|
<!-- :disabled="!edit" --> |
|
|
<!-- :disabled="!edit" --> |
|
@@ -43,8 +43,22 @@ |
|
|
<view class="welCon" v-for="(item, i) in FundsApplyDetail" :key='i'> |
|
|
<view class="welCon" v-for="(item, i) in FundsApplyDetail" :key='i'> |
|
|
<l-input v-model="item.ProjectContent" title="项目内容" placeholder="请填写" right :disabled="!edit" /> |
|
|
<l-input v-model="item.ProjectContent" title="项目内容" placeholder="请填写" right :disabled="!edit" /> |
|
|
<l-input v-model="item.Number" type="number" @change="SumAmountChange(item,'Number')" title="数量" :disabled="!edit" placeholder="请填写" right /> |
|
|
<l-input v-model="item.Number" type="number" @change="SumAmountChange(item,'Number')" title="数量" :disabled="!edit" placeholder="请填写" right /> |
|
|
|
|
|
<l-label title="单位"> |
|
|
|
|
|
<picker |
|
|
|
|
|
@change="changeitem($event,item)" |
|
|
|
|
|
:range="dataSource.FundsApply.Unit" |
|
|
|
|
|
:disabled="!edit" |
|
|
|
|
|
range-key="text" |
|
|
|
|
|
> |
|
|
|
|
|
<view class="picker">{{ item.Unit ? mapitem(item.Unit) : '请选择单位' }}</view> |
|
|
|
|
|
</picker> |
|
|
|
|
|
</l-label> |
|
|
<l-input v-model="item.Price" type="number" @blur="blurChange(item)" title="单价(元)" :disabled="!edit" placeholder="请填写" right /> |
|
|
<l-input v-model="item.Price" type="number" @blur="blurChange(item)" title="单价(元)" :disabled="!edit" placeholder="请填写" right /> |
|
|
<l-input v-model="item.Amount" title="金额(元)" disabled placeholder="请填写" right /> |
|
|
<l-input v-model="item.Amount" title="金额(元)" disabled placeholder="请填写" right /> |
|
|
|
|
|
<!-- <l-select @input="setValue('item.Unit', $event)" :value="getValue('item.Unit')" :range="dataSource.FundsApply.Unit" title="单位" :disabled="!edit" /> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view v-if="edit||create" class="welDel" @click="del('FundsApplyDetails', i)"><text |
|
|
<view v-if="edit||create" class="welDel" @click="del('FundsApplyDetails', i)"><text |
|
|
class="text-xxl cuIcon cuIcon-move"></text></view> |
|
|
class="text-xxl cuIcon cuIcon-move"></text></view> |
|
|
|
|
|
|
|
@@ -129,7 +143,8 @@ |
|
|
ProjectContent: '', |
|
|
ProjectContent: '', |
|
|
Number: '', |
|
|
Number: '', |
|
|
Price: '', |
|
|
Price: '', |
|
|
Amount: '' |
|
|
|
|
|
|
|
|
Amount: '', |
|
|
|
|
|
Unit:'' |
|
|
}, |
|
|
}, |
|
|
// 表单项数据结构 |
|
|
// 表单项数据结构 |
|
|
scheme: { |
|
|
scheme: { |
|
@@ -161,14 +176,14 @@ |
|
|
dataSourceId: 'IsFixedAssets', |
|
|
dataSourceId: 'IsFixedAssets', |
|
|
verify: 'NotNull' |
|
|
verify: 'NotNull' |
|
|
}, |
|
|
}, |
|
|
// Remark: { |
|
|
|
|
|
// type: 'texteditor', |
|
|
|
|
|
// title: '备注', |
|
|
|
|
|
// }, |
|
|
|
|
|
Remark: { |
|
|
Remark: { |
|
|
type: 'text', |
|
|
|
|
|
title: '申请人', |
|
|
|
|
|
|
|
|
type: 'texteditor', |
|
|
|
|
|
title: '备注', |
|
|
}, |
|
|
}, |
|
|
|
|
|
// Remark: { |
|
|
|
|
|
// type: 'text', |
|
|
|
|
|
// title: '申请人', |
|
|
|
|
|
// }, |
|
|
SumAmount: { |
|
|
SumAmount: { |
|
|
type: 'text', |
|
|
type: 'text', |
|
|
title: '总金额' |
|
|
title: '总金额' |
|
@@ -194,10 +209,15 @@ |
|
|
IsFixedAssets: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({ |
|
|
IsFixedAssets: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({ |
|
|
value: t.value, |
|
|
value: t.value, |
|
|
text: t.text |
|
|
text: t.text |
|
|
})) |
|
|
|
|
|
|
|
|
})), |
|
|
|
|
|
Unit:Object.values(this.GET_GLOBAL('dataDictionary').sldw).map(t => ({ |
|
|
|
|
|
value: t.value, |
|
|
|
|
|
text: t.text |
|
|
|
|
|
})), |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
EnCode: '' |
|
|
|
|
|
|
|
|
EnCode: '', |
|
|
|
|
|
index:0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -206,6 +226,7 @@ |
|
|
id |
|
|
id |
|
|
}) { |
|
|
}) { |
|
|
await this.init(type, id) |
|
|
await this.init(type, id) |
|
|
|
|
|
console.log(this.dataSource.FundsApply.Unit) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
@@ -304,7 +325,10 @@ |
|
|
this.CONFIRM('表单验证失败', '明细单价不能为空') |
|
|
this.CONFIRM('表单验证失败', '明细单价不能为空') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.FundsApplyDetail.some((val) => val.Unit== '')) { |
|
|
|
|
|
this.CONFIRM('表单验证失败', '明细单位不能为空') |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) { |
|
|
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) { |
|
|
return |
|
|
return |
|
@@ -383,6 +407,7 @@ |
|
|
add(str) { |
|
|
add(str) { |
|
|
let jsons = this.COPY(this[str]); |
|
|
let jsons = this.COPY(this[str]); |
|
|
this.FundsApplyDetail.push(jsons) |
|
|
this.FundsApplyDetail.push(jsons) |
|
|
|
|
|
// console.log(this.FundsApplyDetail) |
|
|
}, |
|
|
}, |
|
|
del(str, num) { |
|
|
del(str, num) { |
|
|
let _this = this |
|
|
let _this = this |
|
@@ -479,6 +504,16 @@ |
|
|
} |
|
|
} |
|
|
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); |
|
|
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); |
|
|
}, |
|
|
}, |
|
|
|
|
|
changeitem(e,item){ |
|
|
|
|
|
// console.log(item) |
|
|
|
|
|
item.Unit = this.dataSource.FundsApply.Unit[e.detail.value].value |
|
|
|
|
|
// item.Unit = |
|
|
|
|
|
}, |
|
|
|
|
|
mapitem(data){ |
|
|
|
|
|
return this.dataSource.FundsApply.Unit.filter(item=>{ |
|
|
|
|
|
return item.value == data |
|
|
|
|
|
})[0].text |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
// Price(){ |
|
|
// Price(){ |
|
|