细节修改

main
fanfan 8 months ago
parent f821d1c9db
commit b0638583eb
  1. 2
      src/api/goods/index.js
  2. 5
      src/views/dataCenter/goods/Create.vue
  3. 12
      src/views/dataCenter/goods/Update.vue
  4. 12
      src/views/dataCenter/goods/modify.vue
  5. 4
      src/views/dataCenter/goods/modules/MultiSpec.vue

@ -138,7 +138,7 @@ export function addPrice (data) {
export function exportData (data) {
return axios({
url: api.exportData,
method: 'get',
method: 'post',
data: data
})
}

@ -643,7 +643,6 @@ export default {
handleSubmit (e) {
e.preventDefault()
//
console.log(this.form)
const { form: { validateFields }, ruleList } = this
validateFields((errors, values) => {
// tab
@ -733,16 +732,12 @@ export default {
//
handleAreaSubmit (result) {
// console.log(JSON.stringify(this.ruleList))
const { custom: { scene, item } } = result
console.log(item,'KKKKKKKK')
item.region = result.selectedCityIds
item.region_text = result.selectedText
if (scene === 'add') {
this.ruleList.push(item)
}
console.log( this.ruleList,'3333333333')
},
// id(id)

@ -368,7 +368,7 @@
</p>
</template>
</a-table>
<a-button icon="environment" v-if="ruleList.length==0" @click="handleAdd">点击添加销售区域</a-button>
<a-button icon="environment" v-if="ruleList.length == 0" @click="handleAdd">点击添加销售区域</a-button>
</a-form-item>
</div>
@ -600,6 +600,7 @@ export default {
// (form-item)
this.$nextTick(() => {
this.form.setFieldsValue(GoodsModel.getFieldsValue2())
this.ruleList = this.formData.goods.rules?this.formData.goods.rules:[]
this.onForceUpdate()
})
}
@ -767,15 +768,6 @@ export default {
if (scene === 'add') {
this.ruleList.push(item)
}
// if (this.ruleList.length > 0) {
// let region = []
// let region_text = []
// this.ruleList.forEach(function (item) {
// region = region.concat(item.region)
// region_text = region_text.concat(item.region_text)
// })
// this.ruleList = [{ key: 0, region: region, region_text: region_text }]
// }
},
// id(id)

@ -7,7 +7,7 @@
<div class="container">
<div class="upload-dragger">
<a-upload-dragger
accept=".xls, .xlsx"
accept=".csv"
:multiple="false"
:fileList="fileList"
:showUploadList="false"
@ -19,7 +19,7 @@
</p>
<div v-if="!fileList.length">
<p class="ant-upload-text">点击选择文件或者将文件拖拽至此区域</p>
<p class="ant-upload-hint">仅支持 .xls, .xlsx 格式的excel文件限2M以内</p>
<p class="ant-upload-hint">仅支持.csv 格式的excel文件限2M以内</p>
</div>
<div v-else>
<p class="ant-upload-text">
@ -81,14 +81,6 @@ export default {
//
beforeUpload(file) {
let testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
const extension = testmsg === 'xlsx'
const extension2 = testmsg === 'xls'
//
if (!extension && !extension2) {
this.$message.error('只能上传 xlsx 或者 xls 文件')
return false
}
const fileSizeMb = file.size / 1024 / 1024
if (fileSizeMb > this.uploadSizeLimit) {
this.$message.error(`上传的文件大小不能超出${this.uploadSizeLimit}MB`)

@ -324,7 +324,7 @@ export default {
<style lang="less" scoped>
//
.spec-group {
width: 895px;
width: 100%;
margin-bottom: 15px;
line-height: normal;
@ -432,7 +432,7 @@ export default {
// sku
.sku-list {
width: 895px;
width: 100%;
/deep/.ant-table-thead > tr > th,
/deep/.ant-table-tbody > tr > td {
white-space: nowrap;

Loading…
Cancel
Save