|
@@ -574,7 +574,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';
|
|
@@ -583,6 +582,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);
|
|
@@ -1062,8 +1064,12 @@ const submitContract = async (formEl: FormInstance | undefined) => {
|
|
|
console.log('error submit!');
|
|
|
return false;
|
|
|
}
|
|
|
- data.contract.isLoading = true;
|
|
|
- let res = await Repertory.addcontract(data.formContract);
|
|
|
+ // 修改为分
|
|
|
+ const contract = clone(data.formContract)
|
|
|
+ contract.amount = getMoneyCent(data.formContract.amount)
|
|
|
+
|
|
|
+ data.contract.isLoading = true;
|
|
|
+ let res = await Repertory.addcontract(contract);
|
|
|
data.contract.isLoading = false;
|
|
|
if (res.code != 0) {
|
|
|
return;
|
|
@@ -1078,8 +1084,12 @@ const submitContract = async (formEl: FormInstance | undefined) => {
|
|
|
* 提交合同表单,编辑
|
|
|
*/
|
|
|
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;
|