2 changed files with 152 additions and 3 deletions
-
27src/views/commodity/commoditySystem/addCommodity.vue
-
128src/views/commodity/commoditySystem/oneSetting.vue
@ -0,0 +1,128 @@ |
|||
<template> |
|||
<el-dialog :title="$t('common.one-click-setting')" width="70%" :visible.sync="showOnSetDialog" append-to-body @close="onDialogClose"> |
|||
<div> |
|||
|
|||
<el-row> |
|||
<el-col :span="4" style="text-align: center">{{$t('product.price')}}</el-col> |
|||
<el-col :span="4" style="text-align: center">{{$t('product.originalprice')}}</el-col> |
|||
<el-col :span="4" style="text-align: center">{{$t('product.rate')}}</el-col> |
|||
<el-col :span="4" style="text-align: center">{{$t('logistics.storehouse')}}</el-col> |
|||
<el-col :span="4" style="text-align: center">{{$t('product.weight')}}</el-col> |
|||
<el-col :span="4" style="text-align: center">{{$t('product.Internationalbarcode')}}</el-col> |
|||
</el-row> |
|||
<el-row style="margin-top: 10px"> |
|||
<el-col :span="4"> |
|||
<el-input-number v-model="setForm.price" :controls="false" :max="999999999" :min="0" :precision="2" |
|||
:step="0.01" /> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-input-number v-model="setForm.originalPrice" :controls="false" :max="999999999" :min="0" :precision="2" |
|||
:step="0.01" /> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-input-number v-model="setForm.rate" :controls="false" :min="0" :precision="2" :step="0.01" /> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-select v-model="setForm.storehouseId" :placeholder="$t('logistics.storehousehint')" clearable style="width: 158px"> |
|||
<el-option v-for="(item, index) in storehouseList" :key="index" :label="item.storehouseName" |
|||
:value="item.storehouseId" /> |
|||
</el-select> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-input-number v-model="setForm.weight" :controls="false" :max="999" :min="0" :precision="6" |
|||
:step="0.01" /> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-input v-model="setForm.sku" maxlength="20" style="width: 158px"/> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div slot="footer" class="dialog-footer" style="margin-top: 30px"> |
|||
<el-button @click="onCancel">{{ $t('common.cancel') }}</el-button> |
|||
<el-button type="primary" @click="onSubmit">{{ $t('common.sure') }}</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import {storehouseGetAll} from "@/api/shopSys"; |
|||
|
|||
export default { |
|||
name: 'oneSetting', |
|||
data() { |
|||
return { |
|||
showOnSetDialog: false, |
|||
setForm: { |
|||
price: 0.00, |
|||
originalPrice: 0.00, |
|||
rate: 0.00, |
|||
storehouseId: undefined, |
|||
weight: 0.00, |
|||
sku: '' |
|||
}, |
|||
//仓库列表 |
|||
storehouseList: [], |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
//仓库列表 |
|||
this.getStorehouseList() |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
// 获取仓库 |
|||
async getStorehouseList() { |
|||
const res = await storehouseGetAll({ page: 1, pageSize: 100 }) |
|||
this.storehouseList = res.data.list |
|||
}, |
|||
|
|||
onSubmit() { |
|||
this.$emit('onOnSetting', this.setForm) |
|||
this.showOnSetDialog = false |
|||
}, |
|||
|
|||
onCancel() { |
|||
this.setForm = { |
|||
price: 0.00, |
|||
originalPrice: 0.00, |
|||
rate: 0.00, |
|||
storehouseId: undefined, |
|||
weight: 0.00, |
|||
sku: '' |
|||
} |
|||
this.showOnSetDialog = false |
|||
}, |
|||
|
|||
onDialogClose() { |
|||
this.setForm = { |
|||
price: 0.00, |
|||
originalPrice: 0.00, |
|||
rate: 0.00, |
|||
storehouseId: undefined, |
|||
weight: 0.00, |
|||
sku: '' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang='scss'> |
|||
|
|||
::v-deep .el-input-number.is-without-controls .el-input__inner { |
|||
padding-left: 15px; |
|||
padding-right: 15px; |
|||
} |
|||
|
|||
::v-deep .el-input-number .el-input__inner { |
|||
padding-left: 10px; |
|||
padding-right: 50px; |
|||
text-align: center; |
|||
} |
|||
::v-deep .el-input-number{ |
|||
width: 158px; |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue