|
|
@@ -49,10 +49,22 @@ export const actions = {
|
|
|
return axios.get(`/api/commodity/component/${commodity.uuid}`)
|
|
|
.then(response => {
|
|
|
commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
|
|
|
- return findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
+ return findStoreInfoFromUuid({ commit }, { uuid: commodity.storeid })
|
|
|
}, err => {
|
|
|
commit('storeInfo/GET_COMPONENT_FAILURE', err)
|
|
|
})
|
|
|
+ } else if (commodity.storeid === process.env.pcbId && commodity.productid) {
|
|
|
+ return axios.get(`/api/product/kind/pcbproperty/${commodity.productid}`)
|
|
|
+ .then(response => {
|
|
|
+ let listData = {properties: []}
|
|
|
+ response.data.forEach(val => {
|
|
|
+ listData.properties.push({value: val[0].value, property: {labelCn: val[1].labelCn}})
|
|
|
+ })
|
|
|
+ commit('storeInfo/GET_COMPONENT_SUCCESS', listData)
|
|
|
+ return findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
+ }, err => {
|
|
|
+ commit('storeInfo/GET_COMPONENT_FAILURE', err)
|
|
|
+ })
|
|
|
} else {
|
|
|
// 如果是非标,清除上一次请求带出的器件信息
|
|
|
commit('storeInfo/GET_COMPONENT_SUCCESS', {})
|