Commit 9f2fff85 authored by Marcus's avatar Marcus

后台入仓时添加商品 / 后台入仓时添加商品-前端 待确定用红字,添加商品用新接口

https://zentao.test.jdshangmen.com/task-view-1921.html
parent df6d4531
...@@ -9,6 +9,15 @@ export function createProduct(data) { ...@@ -9,6 +9,15 @@ export function createProduct(data) {
}) })
} }
// 创建产品
export function addProduct(data) {
return request({
url: '/ecw/product/add',
method: 'post',
data: data
})
}
// 更新产品 // 更新产品
export function updateProduct(data) { export function updateProduct(data) {
return request({ return request({
......
...@@ -14,8 +14,12 @@ ...@@ -14,8 +14,12 @@
<el-option <el-option
v-for="(item, index) in list" v-for="(item, index) in list"
:key="item.id" :key="item.id"
:label="item['title' + lang] + (item.auditStatus === 2 ? '' : `(${$t('审核中')})`)" :label="item['title' + lang] + (item.auditStatus === 2 ? '' : `(${lang === 'Zh' ? '待确定' : 'To be determined'})`)"
:value="index"> :value="index">
<span style="float: left">{{ item['title' + lang] }}</span>
<span style="float: right; color: #c76e6e; font-size: 13px">
{{ item.auditStatus === 2 ? '' : (lang === 'Zh' ? '待确定' : 'To be determined') }}
</span>
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
......
...@@ -451,7 +451,7 @@ import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict" ...@@ -451,7 +451,7 @@ import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order" import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType" import {getProductTypeList} from "@/api/ecw/productType"
import {createProduct} from "@/api/ecw/product" import {addProduct} from "@/api/ecw/product"
export default { export default {
name: "Warehouse", name: "Warehouse",
...@@ -934,7 +934,7 @@ export default { ...@@ -934,7 +934,7 @@ export default {
//商品特性转字符串 //商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',') this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交 // 添加的提交
createProduct(this.productForm).then(response => { addProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功")) this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') { if (this.activeName === 'first') {
this.form.prodId = response.data this.form.prodId = response.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment