|
|
|
@ -36,7 +36,8 @@
|
|
|
|
|
<div class="import-main" v-show="active==2">
|
|
|
|
|
<JNPF-table v-loading="listLoading" :data="list" :span-method="arraySpanMethod">
|
|
|
|
|
<el-table-column :prop="item.id" :label="item.fullName" min-width="300"
|
|
|
|
|
v-for="(item,index) in headerList" :key="index" :align="item.children?'center':'left'" v-if="item.id != 'vehiclePictures'">
|
|
|
|
|
v-for="(item,index) in headerList" :key="index" :align="item.children?'center':'left'"
|
|
|
|
|
v-if="item.id != 'vehiclePictures'">
|
|
|
|
|
<template slot-scope="scope" v-if="!item.children">
|
|
|
|
|
<el-input v-model="scope.row[item.id]" v-if="item.id != 'productName' && item.id != 'voucherPictures'
|
|
|
|
|
&& item.id != 'vehiclePictures'" />
|
|
|
|
@ -47,18 +48,15 @@
|
|
|
|
|
:style='{"width":"100%"}' hasPage>
|
|
|
|
|
</JnpfPopupSelect> -->
|
|
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="scope.row['productName']"
|
|
|
|
|
readonly
|
|
|
|
|
:validate-event="false"
|
|
|
|
|
:disabled="true"
|
|
|
|
|
v-if="item.id == 'productName'"
|
|
|
|
|
>
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="choice(scope.row, scope.$index)"></el-button>
|
|
|
|
|
<el-input v-model="scope.row['productName']" readonly :validate-event="false"
|
|
|
|
|
:disabled="true" v-if="item.id == 'productName'">
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"
|
|
|
|
|
@click="choice(scope.row, scope.$index)"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
|
|
<JnpfUploadImg v-model="scope.row['voucherPictures1']" :disabled="true" v-if="item.id == 'voucherPictures'"
|
|
|
|
|
:fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0">
|
|
|
|
|
<JnpfUploadImg v-model="scope.row['voucherPictures1']" :disabled="true"
|
|
|
|
|
v-if="item.id == 'voucherPictures'" :fileSize="10" sizeUnit="MB" :limit="1"
|
|
|
|
|
pathType="defaultPath" :isAccount="0">
|
|
|
|
|
</JnpfUploadImg>
|
|
|
|
|
<!-- <JnpfUploadImg v-model="scope.row['vehiclePictures1']" :disabled="true" v-if="item.id == 'vehiclePictures'"
|
|
|
|
|
:fileSize="10" sizeUnit="MB" :limit="10" pathType="defaultPath" :isAccount="0">
|
|
|
|
@ -91,7 +89,8 @@
|
|
|
|
|
interfaceId="529919666429100229" :pageSize="20" :columnOptions="productIdcolumnOptions" clearable
|
|
|
|
|
:style='{"width":"100%"}' hasPage>
|
|
|
|
|
</JnpfPopupSelect> -->
|
|
|
|
|
<el-button v-if="obj.id=='delete'" size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
|
<el-button v-if="obj.id=='delete'" size="mini" type="text"
|
|
|
|
|
class="JNPF-table-delBtn"
|
|
|
|
|
@click="handleTableDel(scope.$index,j,item)">删除</el-button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -101,15 +100,13 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column :prop="item.id" :label="item.fullName" min-width="1300"
|
|
|
|
|
v-for="(item,index) in headerList" :key="index" :align="item.children?'center':'left'" v-if="item.id == 'vehiclePictures'">
|
|
|
|
|
v-for="(item,index) in headerList" :key="index" :align="item.children?'center':'left'"
|
|
|
|
|
v-if="item.id == 'vehiclePictures'">
|
|
|
|
|
<template slot-scope="scope" v-if="!item.children">
|
|
|
|
|
<JnpfUploadImg v-model="scope.row['vehiclePictures1']" :disabled="true" v-if="item.id == 'vehiclePictures'"
|
|
|
|
|
:fileSize="10" sizeUnit="MB" :limit="10" pathType="defaultPath" :isAccount="0">
|
|
|
|
|
<JnpfUploadImg v-model="scope.row['vehiclePictures1']" :disabled="true"
|
|
|
|
|
v-if="item.id == 'vehiclePictures'" :fileSize="10" sizeUnit="MB" :limit="10"
|
|
|
|
|
pathType="defaultPath" :isAccount="0">
|
|
|
|
|
</JnpfUploadImg>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="item.children">
|
|
|
|
@ -123,7 +120,8 @@
|
|
|
|
|
<td v-for="(obj,k) in item.children" :key="k"
|
|
|
|
|
:class="obj.id=='delete'?'delete':'td-flex-1 m-0-10'">
|
|
|
|
|
<el-input v-model="row[obj.id]" v-if="obj.id!='delete'" />
|
|
|
|
|
<el-button v-if="obj.id=='delete'" size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
|
<el-button v-if="obj.id=='delete'" size="mini" type="text"
|
|
|
|
|
class="JNPF-table-delBtn"
|
|
|
|
|
@click="handleTableDel(scope.$index,j,item)">删除</el-button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -218,8 +216,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { Download } from '@/api/extend/document'
|
|
|
|
|
import ProductRadioGoodsBox from '@/views/extend/customer/subjectbasic/ProductRadioGoodsBox'
|
|
|
|
|
import { Download } from '@/api/extend/document'
|
|
|
|
|
import ProductRadioGoodsBox from '@/views/extend/customer/subjectbasic/ProductRadioGoodsBox'
|
|
|
|
|
import { getTemplateDownload, getImportPreview, importData, getImportExceptionData } from '@/api/common'
|
|
|
|
|
export default {
|
|
|
|
|
components: { ProductRadioGoodsBox },
|
|
|
|
@ -275,7 +273,7 @@ export default {
|
|
|
|
|
}, {
|
|
|
|
|
"label": "配送方式",
|
|
|
|
|
"value": "deliveryTypeName"
|
|
|
|
|
}, ],
|
|
|
|
|
},],
|
|
|
|
|
flowListVisible: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -286,9 +284,9 @@ export default {
|
|
|
|
|
this.$refs.goodsBox.init(row.productName, index)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initList(list,index) {
|
|
|
|
|
initList(list, index) {
|
|
|
|
|
this.list.forEach(item => {
|
|
|
|
|
if(item.productName == list.name){
|
|
|
|
|
if (item.productName == list.name) {
|
|
|
|
|
item.productId = list.id;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -296,13 +294,13 @@ export default {
|
|
|
|
|
this.list[index].productId = list.id;
|
|
|
|
|
this.list[index].productName = list.name; */
|
|
|
|
|
},
|
|
|
|
|
productChangeData(model, row){
|
|
|
|
|
productChangeData(model, row) {
|
|
|
|
|
},
|
|
|
|
|
init(modelId, url, enableFlow, flowList, businessType, documentType) {
|
|
|
|
|
if(businessType && businessType != ''){
|
|
|
|
|
if (businessType && businessType != '') {
|
|
|
|
|
this.uploadObjs.businessType = businessType
|
|
|
|
|
}
|
|
|
|
|
if(documentType && documentType != ''){
|
|
|
|
|
if (documentType && documentType != '') {
|
|
|
|
|
this.uploadObjs.documentType = documentType
|
|
|
|
|
}
|
|
|
|
|
this.active = 1
|
|
|
|
@ -359,35 +357,35 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
let flag = false
|
|
|
|
|
let index = 0
|
|
|
|
|
for(let i=0;i<this.list.length; i++){
|
|
|
|
|
if(!this.list[i].productId){
|
|
|
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
|
|
|
if (!this.list[i].productId) {
|
|
|
|
|
flag = true
|
|
|
|
|
index = i+1
|
|
|
|
|
index = i + 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!flag){
|
|
|
|
|
}else{
|
|
|
|
|
if (!flag) {
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '请选择第'+ index + '行的商品',
|
|
|
|
|
message: '请选择第' + index + '行的商品',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let flag1 = false
|
|
|
|
|
let index1 = 0
|
|
|
|
|
for(let i=0;i<this.list.length; i++){
|
|
|
|
|
if(!this.list[i].buckleWeight || !this.list[i].freight || !this.list[i].grossWeight || !this.list[i].netWeight || !this.list[i].purchaseAmount || !this.list[i].saleAmount || !this.list[i].tareWeight){
|
|
|
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
|
|
|
if (!this.list[i].buckleWeight || !this.list[i].freight || !this.list[i].grossWeight || !this.list[i].netWeight || !this.list[i].purchaseAmount || !this.list[i].saleAmount || !this.list[i].tareWeight) {
|
|
|
|
|
flag1 = true
|
|
|
|
|
index1 = i+1
|
|
|
|
|
index1 = i + 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!flag1){
|
|
|
|
|
if (!flag1) {
|
|
|
|
|
this.handleSubmit()
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '第'+ index1 + '行的数字金额不能为空,可以填0',
|
|
|
|
|
message: '第' + index1 + '行的数字金额不能为空,可以填0',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
@ -398,11 +396,11 @@ export default {
|
|
|
|
|
this.btnLoading = true
|
|
|
|
|
getImportPreview(this.modelId, { fileName: this.fileName }, this.url).then(res => {
|
|
|
|
|
this.list = res.data.dataRow
|
|
|
|
|
for(let i=0;i<this.list.length; i++){
|
|
|
|
|
if(this.list[i].voucherPictures && this.list[i].voucherPictures != ''){
|
|
|
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
|
|
|
if (this.list[i].voucherPictures && this.list[i].voucherPictures != '') {
|
|
|
|
|
this.list[i].voucherPictures1 = JSON.parse(this.list[i].voucherPictures)
|
|
|
|
|
}
|
|
|
|
|
if(this.list[i].vehiclePictures && this.list[i].vehiclePictures != ''){
|
|
|
|
|
if (this.list[i].vehiclePictures && this.list[i].vehiclePictures != '') {
|
|
|
|
|
this.list[i].vehiclePictures1 = JSON.parse(this.list[i].vehiclePictures)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|