|
@@ -554,7 +554,6 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
-import { Select } from 'ant-design-vue';
|
|
|
import { onMounted, reactive, computed, ref, defineAsyncComponent, nextTick } from 'vue';
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
@@ -563,6 +562,9 @@ import statusList from '/@/views/data/status';
|
|
|
import { ElMessage, ElMessageBox, genFileId } from 'element-plus';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { money, getMoneyCent } from '/@/utils/moneyHelper';
|
|
|
+import { clone } from 'lodash'
|
|
|
+
|
|
|
+
|
|
|
// 定义变量内容
|
|
|
const storesThemeConfig = useThemeConfig();
|
|
|
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
@@ -1028,8 +1030,12 @@ const submitScheduleUpdate = async () => {
|
|
|
* 提交合同表单,新增
|
|
|
*/
|
|
|
const submitContract = async () => {
|
|
|
+ // 修改为分
|
|
|
+ const contract = clone(data.formContract)
|
|
|
+ contract.amount = getMoneyCent(data.formContract.amount)
|
|
|
+
|
|
|
data.contract.isLoading = true;
|
|
|
- let res = await Repertory.addcontract(data.formContract);
|
|
|
+ let res = await Repertory.addcontract(contract);
|
|
|
data.contract.isLoading = false;
|
|
|
if (res.code != 0) {
|
|
|
return;
|
|
@@ -1043,8 +1049,12 @@ const submitContract = async () => {
|
|
|
* 提交合同表单,编辑
|
|
|
*/
|
|
|
const submitContractUpdate = async () => {
|
|
|
+ // 修改为分
|
|
|
+ const contract = clone(data.formContract)
|
|
|
+ contract.amount = getMoneyCent(data.formContract.amount)
|
|
|
+
|
|
|
data.contract.isLoading = true;
|
|
|
- let res = await Repertory.editcontract(data.formContract);
|
|
|
+ let res = await Repertory.editcontract(contract);
|
|
|
data.contract.isLoading = false;
|
|
|
if (res.code != 0) {
|
|
|
return;
|