@@ -41,9 +41,9 @@ export default createStore<any>({ | |||
// 字典 | |||
dictData(context, value) { | |||
//字典全量接口 | |||
BaseService.post(dictApi).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
let bizContent = JSON.parse(res.bizContent) | |||
BaseService.post('/userw/dict/itemgetall').then((res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
let data = bizContent.dictTypeAndItem || {} | |||
console.log(data,'dictTypeAndItem') | |||
let newData = {} |
@@ -79,7 +79,6 @@ export default { | |||
body?: IObject, | |||
headers?: IObject | |||
): Promise<IHttpResponse> { | |||
console.log(body, 'body') | |||
return httpN({ | |||
url: url, | |||
method: 'post', |
@@ -104,6 +104,7 @@ export default (o: AxiosRequestConfig): Promise<IHttpResponse> => { | |||
// } else { | |||
// return resolve(res.data); | |||
// } | |||
res.data.code = res.data.statusCode | |||
return resolve(res.data); | |||
} | |||
}) |
@@ -103,6 +103,7 @@ export default (o: AxiosRequestConfig): Promise<IHttpResponse> => { | |||
// } else { | |||
// return resolve(res.data); | |||
// } | |||
res.data.statusCode = res.data.code | |||
return resolve(res.data); | |||
// } | |||
}) |
@@ -222,6 +222,7 @@ const cardDeviceVersion = computed(() => { | |||
const obuDeviceVersion = computed(() => { | |||
return $storeinitData.state.dictData['OBU_DEVICE_VERSION'] || []; | |||
}) | |||
console.log(obuDeviceVersion.value, 'obuDeviceVersion') | |||
const transferApplyType = computed(() => { | |||
return $storeinitData.state.dictData['TRANSFER_APPLY_TYPE_ADD'] || []; |
@@ -230,8 +230,7 @@ function nextHandle() { | |||
} | |||
let api = '/invw/purchase/addpurchase'; | |||
if (typeOption.value === 'edit') { | |||
// TODO 接口缺失 | |||
api = updateApi | |||
api = '/invw/purchase/updatepurchase' | |||
} | |||
BaseService.postN(api, { | |||
...addForm.value |
@@ -236,6 +236,7 @@ | |||
const obuDeviceVersion = computed(() => { | |||
return $storeinitData.state.dictData['OBU_DEVICE_VERSION'] || []; | |||
}) | |||
const deviceModelList = computed(() => { | |||
return $storeinitData.state.dictData['UNIT_TYPE'] || []; | |||
}) | |||
@@ -604,7 +605,7 @@ | |||
let tem = {}; | |||
for (let key in item) { | |||
if (keys.indexOf(key) < 0) { | |||
tem[key] = item[key]; | |||
tem[key] = item[key] | |||
} | |||
} | |||
list.push(tem); |