Compare commits
No commits in common. "36013a147ac51080b302491dc9d73d2e75ad4005" and "aadd3e2c1dea8f9ac16d23366f961e75a828632d" have entirely different histories.
36013a147a
...
aadd3e2c1d
@ -72,8 +72,7 @@
|
||||
<el-input v-model="itemInfo.title" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="组合编码:">
|
||||
<el-input v-model="itemInfo.combination_goods_code" clearable :disabled="itemInfo.mx_goods_skus && itemInfo.mx_goods_skus.length" style="width: 400px;"></el-input>
|
||||
<el-button type="text" @click="openCode()" v-if="itemInfo.mx_goods_skus && itemInfo.mx_goods_skus.length" size="mini">修改编码</el-button>
|
||||
<el-input v-model="itemInfo.combination_goods_code" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定库存:">
|
||||
<el-input v-model="itemInfo.lock_in_stock" clearable></el-input>
|
||||
@ -142,20 +141,6 @@
|
||||
<img :src="dialogImageUrl" style="max-width: 700px; margin: 0 auto;display: block;" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="showCode" width="400px" title="修改编码">
|
||||
<el-form label-width="70px">
|
||||
<el-form-item label="编码:">
|
||||
<el-input placeholder="" v-model="new_code" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showCode = false">取消</el-button>
|
||||
<el-button type="primary" @click="commitCode()">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -183,9 +168,7 @@ export default {
|
||||
opa_loading: false,
|
||||
itemInfo: {},
|
||||
goodsSkus: [],
|
||||
skusList: [],
|
||||
showCode: false,
|
||||
new_code: ''
|
||||
skusList: []
|
||||
})
|
||||
|
||||
function handleSearch() {
|
||||
@ -332,26 +315,6 @@ export default {
|
||||
return result.toFixed(2)
|
||||
}
|
||||
|
||||
function openCode() {
|
||||
data.new_code = ''
|
||||
data.showCode = true
|
||||
}
|
||||
|
||||
function commitCode() {
|
||||
if(!data.new_code) {
|
||||
return ElMessage.info('请输入编码')
|
||||
}
|
||||
let params = {
|
||||
id: data.itemInfo.id,
|
||||
code: data.new_code
|
||||
}
|
||||
post(`/api/combinationGoods/changeCode`, params).then((res) => {
|
||||
data.itemInfo.combination_goods_code = data.new_code
|
||||
data.showCode = false
|
||||
ElMessage.success('修改成功')
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
getSkusList()
|
||||
@ -370,9 +333,7 @@ export default {
|
||||
toAddSku,
|
||||
getSkusList,
|
||||
handleUpload,
|
||||
computeCost,
|
||||
openCode,
|
||||
commitCode
|
||||
computeCost
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,8 +145,7 @@
|
||||
<el-input placeholder="规格名称" v-model="item.title" clearable style="width: 250px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格编码:">
|
||||
<el-input placeholder="规格编码" v-model="item.sku_code" clearable style="width: 180px;" :disabled="item.mx_goods_skus && item.mx_goods_skus.length"></el-input>
|
||||
<el-button type="text" @click="openCode(item, i)" v-if="item.mx_goods_skus && item.mx_goods_skus.length" size="mini">修改编码</el-button>
|
||||
<el-input placeholder="规格编码" v-model="item.sku_code" clearable style="width: 250px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库:">
|
||||
<el-select v-model="item.warehouse_id" placeholder="请选择" clearable style="width: 250px;">
|
||||
@ -218,20 +217,6 @@
|
||||
<img :src="dialogImageUrl" style="max-width: 700px; margin: 0 auto;display: block;" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="showCode" width="400px" title="修改编码">
|
||||
<el-form label-width="70px">
|
||||
<el-form-item label="编码:">
|
||||
<el-input placeholder="" v-model="new_code" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showCode = false">取消</el-button>
|
||||
<el-button type="primary" @click="commitCode()">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -267,11 +252,7 @@ export default {
|
||||
brandList: [],
|
||||
warehouseList: [],
|
||||
itemInfo: {},
|
||||
skusList: [],
|
||||
tempIndex: 0,
|
||||
tempId: 0,
|
||||
showCode: false,
|
||||
new_code: ''
|
||||
skusList: []
|
||||
})
|
||||
|
||||
function handleSearch() {
|
||||
@ -465,28 +446,6 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
function openCode(row, i) {
|
||||
data.tempIndex = i
|
||||
data.tempId = row.id
|
||||
data.new_code = ''
|
||||
data.showCode = true
|
||||
}
|
||||
|
||||
function commitCode() {
|
||||
if(!data.new_code) {
|
||||
return ElMessage.info('请输入编码')
|
||||
}
|
||||
let params = {
|
||||
skuId: data.tempId,
|
||||
skuCode: data.new_code
|
||||
}
|
||||
post(`/api/goods/sku/changeCode`, params).then((res) => {
|
||||
data.skusList[data.tempIndex].sku_code = data.new_code
|
||||
data.showCode = false
|
||||
ElMessage.success('修改成功')
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
getBrandList()
|
||||
@ -513,9 +472,7 @@ export default {
|
||||
toAddSku,
|
||||
handleRemoveImg,
|
||||
getBrandList,
|
||||
getWarehouseList,
|
||||
openCode,
|
||||
commitCode
|
||||
getWarehouseList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user