fix: 自测bug修复。

This commit is contained in:
tianyongbao
2025-03-31 13:02:30 +08:00
parent ca5dca4c4e
commit a8efa6efac
4 changed files with 21 additions and 20 deletions

View File

@@ -138,6 +138,8 @@ const data = reactive({
queryParams: { queryParams: {
name: null, name: null,
type: null, type: null,
repayFlag: '1',
type: '1',
state: null state: null
} }
}) })

View File

@@ -228,6 +228,9 @@ getDicts('deal_category').then(result => {
queryAccountParams.value.type = null queryAccountParams.value.type = null
} }
if(flag.value!=null){
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
}
listAccounts(queryAccountParams.value).then((response) => { listAccounts(queryAccountParams.value).then((response) => {
accountNameList.value = [response.rows] accountNameList.value = [response.rows]
}) })

View File

@@ -33,7 +33,7 @@
<u--input v-model="form.ranking" type="number" placeholder="请填写排序" <u--input v-model="form.ranking" type="number" placeholder="请填写排序"
inputAlign="right" border="none"></u--input> inputAlign="right" border="none"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="备注" prop="remark" required labelPosition="top"> <u-form-item label="备注" prop="remark" labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count <u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea> maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item> </u-form-item>

View File

@@ -159,22 +159,15 @@ function getData() {
unitList.value =[res.data] unitList.value =[res.data]
}) })
listProductInfor(queryProductParams.value).then((response) => {
productNameList.value = [response.rows]
})
// 记账类型
getDicts('product_category').then(result => {
form.value.categoryName=dictStr(form.value.category, result.data)
})
// 交易类型
getDicts('product_unit').then(result => {
form.value.unitName=dictStr(form.value.unit, result.data)
})
if(form.value.id!=null){ if(form.value.id!=null){
getProductPriceRecord(form.value.id).then(res => { getProductPriceRecord(form.value.id).then(res => {
form.value = res.data form.value = res.data
queryProductParams.value.category = form.value.category
if(queryProductParams.value.category!=null){
listProductInfor(queryProductParams.value).then((response) => {
productNameList.value = [response.rows]
}) }
// 记账类型 // 记账类型
getDicts('product_category').then(result => { getDicts('product_category').then(result => {
@@ -184,12 +177,15 @@ function getData() {
getDicts('product_unit').then(result => { getDicts('product_unit').then(result => {
form.value.unitName=dictStr(form.value.unit, result.data) form.value.unitName=dictStr(form.value.unit, result.data)
}) })
if(flag.value!=null){
form.value.recordTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
}
queryProductParams.value.category = form.value.category })
}else {
listProductInfor(queryProductParams.value).then((response) => { listProductInfor(queryProductParams.value).then((response) => {
productNameList.value = [response.rows] productNameList.value = [response.rows]
}) })
})
} }
} }
function dictStr(val, arr) { function dictStr(val, arr) {