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) {
})
}
// 创建产品
export function addProduct(data) {
return request({
url: '/ecw/product/add',
method: 'post',
data: data
})
}
// 更新产品
export function updateProduct(data) {
return request({
......
......@@ -14,8 +14,12 @@
<el-option
v-for="(item, index) in list"
: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">
<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-select>
</template>
......@@ -59,7 +63,7 @@ export default {
init(){
if(!this.value){
this.index = null
return
return
}
let index = this.list.findIndex(item => item.id == this.value)
if(index < 0){
......@@ -93,4 +97,4 @@ export default {
}
}
}
</script>
\ No newline at end of file
</script>
......@@ -451,7 +451,7 @@ import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {createProduct} from "@/api/ecw/product"
import {addProduct} from "@/api/ecw/product"
export default {
name: "Warehouse",
......@@ -934,7 +934,7 @@ export default {
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交
createProduct(this.productForm).then(response => {
addProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') {
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