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-input v-model="itemInfo.title" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="组合编码:">
|
<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-input v-model="itemInfo.combination_goods_code" clearable></el-input>
|
||||||
<el-button type="text" @click="openCode()" v-if="itemInfo.mx_goods_skus && itemInfo.mx_goods_skus.length" size="mini">修改编码</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="锁定库存:">
|
<el-form-item label="锁定库存:">
|
||||||
<el-input v-model="itemInfo.lock_in_stock" clearable></el-input>
|
<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;" />
|
<img :src="dialogImageUrl" style="max-width: 700px; margin: 0 auto;display: block;" />
|
||||||
</el-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -183,9 +168,7 @@ export default {
|
|||||||
opa_loading: false,
|
opa_loading: false,
|
||||||
itemInfo: {},
|
itemInfo: {},
|
||||||
goodsSkus: [],
|
goodsSkus: [],
|
||||||
skusList: [],
|
skusList: []
|
||||||
showCode: false,
|
|
||||||
new_code: ''
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleSearch() {
|
function handleSearch() {
|
||||||
@ -332,26 +315,6 @@ export default {
|
|||||||
return result.toFixed(2)
|
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(() => {
|
onMounted(() => {
|
||||||
fetchData()
|
fetchData()
|
||||||
getSkusList()
|
getSkusList()
|
||||||
@ -370,9 +333,7 @@ export default {
|
|||||||
toAddSku,
|
toAddSku,
|
||||||
getSkusList,
|
getSkusList,
|
||||||
handleUpload,
|
handleUpload,
|
||||||
computeCost,
|
computeCost
|
||||||
openCode,
|
|
||||||
commitCode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,8 +145,7 @@
|
|||||||
<el-input placeholder="规格名称" v-model="item.title" clearable style="width: 250px;"></el-input>
|
<el-input placeholder="规格名称" v-model="item.title" clearable style="width: 250px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规格编码:">
|
<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-input placeholder="规格编码" v-model="item.sku_code" clearable style="width: 250px;"></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-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="仓库:">
|
<el-form-item label="仓库:">
|
||||||
<el-select v-model="item.warehouse_id" placeholder="请选择" clearable style="width: 250px;">
|
<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;" />
|
<img :src="dialogImageUrl" style="max-width: 700px; margin: 0 auto;display: block;" />
|
||||||
</el-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -267,11 +252,7 @@ export default {
|
|||||||
brandList: [],
|
brandList: [],
|
||||||
warehouseList: [],
|
warehouseList: [],
|
||||||
itemInfo: {},
|
itemInfo: {},
|
||||||
skusList: [],
|
skusList: []
|
||||||
tempIndex: 0,
|
|
||||||
tempId: 0,
|
|
||||||
showCode: false,
|
|
||||||
new_code: ''
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleSearch() {
|
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(() => {
|
onMounted(() => {
|
||||||
fetchData()
|
fetchData()
|
||||||
getBrandList()
|
getBrandList()
|
||||||
@ -513,9 +472,7 @@ export default {
|
|||||||
toAddSku,
|
toAddSku,
|
||||||
handleRemoveImg,
|
handleRemoveImg,
|
||||||
getBrandList,
|
getBrandList,
|
||||||
getWarehouseList,
|
getWarehouseList
|
||||||
openCode,
|
|
||||||
commitCode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user