Commit fa2eef81 authored by 徐俊's avatar 徐俊

xujun

parent e63f2230
...@@ -69,8 +69,8 @@ export default { ...@@ -69,8 +69,8 @@ export default {
data() { data() {
return { return {
invisibleTotalBudget: [], invisibleTotalBudget: [],
invisibleApplyFunds: [0, 3, 4], invisibleApplyFunds: [0, 2, 3, 4],
invisibleSelfFunds: [0, 3, 4], invisibleSelfFunds: [0, 1, 3, 4],
}; };
}, },
props: { props: {
......
...@@ -90,12 +90,12 @@ ...@@ -90,12 +90,12 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.unitPrice'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.unitPrice'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.unitPrice" @change="outUnitPriceChange(index)" :min="0" :step="0.01" style="width: 80%" /> <a-input-number v-model="item.unitPrice" @change="outUnitPriceChange(index)" :min="0" :step="0.01" style="width: 90%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="1"> <a-col :span="1">
<a-form-model-item :prop="'equipments.' + index + '.quantity'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.quantity'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.quantity" @change="outNumberChange(index)" :min="1" :step="1" style="width: 80%" /> <a-input-number v-model="item.quantity" @change="outNumberChange(index)" :min="1" :step="1" style="width: 90%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
...@@ -114,27 +114,27 @@ ...@@ -114,27 +114,27 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.equipmentType'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.equipmentType'" :rules="{required: false, message: '*', trigger: 'blur',}">
<a-input v-model="item.equipmentType" :maxLength="100" style="width: 90%;" /> <a-input v-model="item.equipmentType" :maxLength="100" style="width: 90%;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.manufacturer'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.manufacturer'" :rules="{required: false, message: '*', trigger: 'blur',}">
<a-input v-model="item.manufacturer" :maxLength="100" style="width: 90%;" /> <a-input v-model="item.manufacturer" :maxLength="100" style="width: 90%;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.specificationType'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.specificationType'" :rules="{required: false, message: '*', trigger: 'blur',}">
<a-input v-model="item.specificationType" :maxLength="100" style="width: 90%;" /> <a-input v-model="item.specificationType" :maxLength="100" style="width: 90%;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.sharedScope'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.sharedScope'" :rules="{required: false, message: '*', trigger: 'blur',}">
<a-input v-model="item.sharedScope" :maxLength="100" style="width: 90%;" /> <a-input v-model="item.sharedScope" :maxLength="100" style="width: 90%;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'equipments.' + index + '.useFrom'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'equipments.' + index + '.useFrom'" :rules="{required: false, message: '*', trigger: 'blur',}">
<a-input v-model="item.useFrom" :maxLength="200" style="width: 90%;" /> <a-input v-model="item.useFrom" :maxLength="200" style="width: 90%;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -342,5 +342,13 @@ export default { ...@@ -342,5 +342,13 @@ export default {
this.calNumberAmount() this.calNumberAmount()
}, },
}, },
watch: {
equipments: {
handler (equipments) {
if (!!equipments)
this.calNumberAmount()
},
},
}
}; };
</script> </script>
\ No newline at end of file
...@@ -85,13 +85,17 @@ ...@@ -85,13 +85,17 @@
<div class="special-middle">{{ item.functionTarget }}</div> <div class="special-middle">{{ item.functionTarget }}</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle">{{parseFloat(item.unitPrice).toFixed(2)}}</div> <div class="special-middle">
{{ parseFloat(item.unitPrice).toFixed(2) }}
</div>
</a-col> </a-col>
<a-col :span="1"> <a-col :span="1">
<div class="special-middle">{{ item.quantity }}</div> <div class="special-middle">{{ item.quantity }}</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle">{{ parseFloat(item.totalBudget).toFixed(2) }}</div> <div class="special-middle">
{{ parseFloat(item.totalBudget).toFixed(2) }}
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle">{{ item.buyUnit }}</div> <div class="special-middle">{{ item.buyUnit }}</div>
...@@ -118,16 +122,22 @@ ...@@ -118,16 +122,22 @@
<a-row type="flex" class="row_center"> <a-row type="flex" class="row_center">
<a-col :span="5"> <a-col :span="5">
<div class="special-middle"><div>单价50万元及以上购置设备合计</div></div> <div class="special-middle">
<div>单价50万元及以上购置设备合计</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
</a-col> </a-col>
<a-col :span="1"> <a-col :span="1">
<div class="special-middle"><div>{{ fiftyUpNumber }}</div></div> <div class="special-middle">
<div>{{ fiftyUpNumber }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>{{ parseFloat(fiftyUpAmount).toFixed(2) }}</div></div> <div class="special-middle">
<div>{{ parseFloat(fiftyUpAmount).toFixed(2) }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
...@@ -159,10 +169,14 @@ ...@@ -159,10 +169,14 @@
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
</a-col> </a-col>
<a-col :span="1"> <a-col :span="1">
<div class="special-middle"><div>{{ fiftyDownNumber }}</div></div> <div class="special-middle">
<div>{{ fiftyDownNumber }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>{{ parseFloat(fiftyDownAmount).toFixed(2) }}</div></div> <div class="special-middle">
<div>{{ parseFloat(fiftyDownAmount).toFixed(2) }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
...@@ -194,10 +208,14 @@ ...@@ -194,10 +208,14 @@
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
</a-col> </a-col>
<a-col :span="1"> <a-col :span="1">
<div class="special-middle"><div>{{ totalNumber }}</div></div> <div class="special-middle">
<div>{{ totalNumber }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>{{ parseFloat(totalAmount).toFixed(2) }}</div></div> <div class="special-middle">
<div>{{ parseFloat(totalAmount).toFixed(2) }}</div>
</div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"><div>/</div></div> <div class="special-middle"><div>/</div></div>
...@@ -223,41 +241,42 @@ ...@@ -223,41 +241,42 @@
</a-row> </a-row>
<a-row type="flex" class="item_inner"> <a-row type="flex" class="item_inner">
<a-col :span="24"> <a-col :span="24">
<span style="color: red;">注:1.本表只填写省级财政科技资金购置的设备;涉及自筹经费购买的设备,请在资金预算编制说明中说明。<br /> <span style="color: red">
注:1.本表只填写省级财政科技资金购置的设备;涉及自筹经费购买的设备,请在资金预算编制说明中说明。<br />
2.单价50万元以下的设备不填写明细。</span> 2.单价50万元以下的设备不填写明细。</span>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</template> </template>
<script> <script>
const Equipment = { const Equipment = {
id: "", id: "",
objectId: "", objectId: "",
name: "", name: "",
functionTarget: "", functionTarget: "",
specificationType: "", specificationType: "",
quantity: 1, quantity: 1,
totalBudget: 0.00, totalBudget: 0.0,
useFrom: "", useFrom: "",
buyUnit: "", buyUnit: "",
storageLocation: "", storageLocation: "",
equipmentType: "", equipmentType: "",
manufacturer: "", manufacturer: "",
sharedScope: "", sharedScope: "",
unitPrice: 0.00, unitPrice: 0.0,
}; };
export default { export default {
name: "EquipmentInfo", name: "EquipmentInfo",
data() { data() {
return { return {
fiftyUpNumber: 0, fiftyUpNumber: 0,
fiftyUpAmount: 0.00, fiftyUpAmount: 0.0,
fiftyDownNumber: 0, fiftyDownNumber: 0,
fiftyDownAmount: 0.00, fiftyDownAmount: 0.0,
totalNumber: 0, totalNumber: 0,
totalAmount: 0.00, totalAmount: 0.0,
}; };
}, },
props: { props: {
...@@ -268,34 +287,44 @@ ...@@ -268,34 +287,44 @@
}, },
}, },
}, },
created () { created() {
this.calNumberAmount();
}, },
methods: { methods: {
calNumberAmount() { calNumberAmount() {
this.fiftyUpAmount = 0.00 this.fiftyUpAmount = 0.0;
this.fiftyDownAmount = 0.00 this.fiftyDownAmount = 0.0;
this.fiftyUpNumber = 0 this.fiftyUpNumber = 0;
this.fiftyDownNumber = 0 this.fiftyDownNumber = 0;
this.equipments.forEach(e => { this.equipments.forEach((e) => {
if (e.unitPrice >= 50) { if (e.unitPrice >= 50) {
this.fiftyUpAmount += e.unitPrice * e.quantity this.fiftyUpAmount += e.unitPrice * e.quantity;
this.fiftyUpNumber += e.quantity this.fiftyUpNumber += e.quantity;
} else { } else {
this.fiftyDownAmount += e.unitPrice * e.quantity this.fiftyDownAmount += e.unitPrice * e.quantity;
this.fiftyDownNumber += e.quantity this.fiftyDownNumber += e.quantity;
} }
}) });
this.totalNumber = this.fiftyUpNumber + this.fiftyDownNumber this.totalNumber = this.fiftyUpNumber + this.fiftyDownNumber;
this.totalAmount = this.fiftyUpAmount + this.fiftyDownAmount this.totalAmount = this.fiftyUpAmount + this.fiftyDownAmount;
}, },
outUnitPriceChange(index) { outUnitPriceChange(index) {
this.equipments[index].totalBudget = this.equipments[index].unitPrice * this.equipments[index].quantity this.equipments[index].totalBudget =
this.calNumberAmount() this.equipments[index].unitPrice * this.equipments[index].quantity;
this.calNumberAmount();
}, },
outNumberChange(index) { outNumberChange(index) {
this.equipments[index].totalBudget = this.equipments[index].unitPrice * this.equipments[index].quantity this.equipments[index].totalBudget =
this.calNumberAmount() this.equipments[index].unitPrice * this.equipments[index].quantity;
this.calNumberAmount();
}, },
}, },
}; watch: {
</script> equipments: {
\ No newline at end of file handler(equipments) {
if (!!equipments) this.calNumberAmount();
},
},
},
};
</script>
\ No newline at end of file
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-form-model-item :prop="'unitPayment.' + index + '.unitRole'" :rules="{required: true, message: '*', trigger: 'blur',}"> <a-form-model-item :prop="'unitPayment.' + index + '.unitRole'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.unitRole" :maxLength="100" style="width: 90%;" /> <para-select v-model="item.unitRole" :typeId="65" :isAll="true" :width="110" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
...@@ -151,6 +151,8 @@ ...@@ -151,6 +151,8 @@
</template> </template>
<script> <script>
import paraSelect from '@/views/components/common/paraSelect'
const Payment = { const Payment = {
id: "", id: "",
objectId: "", objectId: "",
...@@ -168,6 +170,9 @@ const Payment = { ...@@ -168,6 +170,9 @@ const Payment = {
export default { export default {
name: "UnitPaymentEdit", name: "UnitPaymentEdit",
components: {
paraSelect
},
props: { props: {
unitPayment: { unitPayment: {
type: Array, type: Array,
...@@ -184,6 +189,8 @@ export default { ...@@ -184,6 +189,8 @@ export default {
TselfAmount: 0.00, TselfAmount: 0.00,
}; };
}, },
created() {
},
methods: { methods: {
addArrey() { addArrey() {
this.unitPayment.push(Object.assign({ ...Payment })) this.unitPayment.push(Object.assign({ ...Payment }))
...@@ -220,5 +227,13 @@ export default { ...@@ -220,5 +227,13 @@ export default {
}) })
} }
}, },
watch: {
unitPayment: {
handler (unitPayment) {
if (!!unitPayment)
this.calTotalAmount()
},
},
}
}; };
</script> </script>
\ No newline at end of file
...@@ -166,6 +166,8 @@ export default { ...@@ -166,6 +166,8 @@ export default {
TselfAmount: 0.00, TselfAmount: 0.00,
}; };
}, },
created() {
},
methods: { methods: {
outAmountChange(index) { outAmountChange(index) {
this.unitPayment[index].totalAmount = this.unitPayment[index].fundAmount + this.unitPayment[index].selfAmount this.unitPayment[index].totalAmount = this.unitPayment[index].fundAmount + this.unitPayment[index].selfAmount
...@@ -193,5 +195,13 @@ export default { ...@@ -193,5 +195,13 @@ export default {
}) })
} }
}, },
watch: {
unitPayment: {
handler (unitPayment) {
if (!!unitPayment)
this.calTotalAmount()
},
},
}
}; };
</script> </script>
\ No newline at end of file
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