|
|
@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
<div class="tab-header webtop"> |
|
|
|
<!-- 标题 --> |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div>商品信息</div> |
|
|
|
<!-- start 添加修改按钮 --> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
|
|
@ -13,52 +13,56 @@ |
|
|
|
<!-- end 详情按钮 --> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
<div class="listconadd" style="padding-left: 150px;padding-right: 150px;padding-bottom: 50px;"> |
|
|
|
|
|
|
|
<el-card> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text"><span class="icon">*</span>商品名称:</span> |
|
|
|
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text"><span class="icon">*</span>商品编码:</span> |
|
|
|
<el-input v-model="formobj.codeUnified" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text"><span class="icon">*</span>分类:</span> |
|
|
|
<el-select v-model="formobj.completionStatusKey" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
<el-select v-model="formobj.category" filterable placeholder="请选择" clearable class="item_input" |
|
|
|
@change="categoryChange"> |
|
|
|
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text"><span class="icon">*</span>品牌:</span> |
|
|
|
<el-select v-model="formobj.completionStatusKey" filterable placeholder="请选择" clearable> |
|
|
|
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|
|
|
<el-select v-model="formobj.brand" filterable placeholder="请选择" clearable class="item_input" |
|
|
|
@change="brandChange"> |
|
|
|
<el-option v-for="item in state_list2" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text"><span class="icon">*</span>进货单价:</span> |
|
|
|
<el-input v-model="formobj.address" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.newestPurchasePrice" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text">规格:</span> |
|
|
|
<el-input v-model="formobj.legalRepresentative" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.description" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text">单位:</span> |
|
|
|
<el-input v-model="formobj.bankName" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.unit" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text">生产厂家:</span> |
|
|
|
<el-input v-model="formobj.bankAccount" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.manufacturer" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<span class="item_text">保质期:</span> |
|
|
|
<el-input v-model="formobj.bankAccountNumber" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.qualityGuaranteePeriod" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
<div class="item" style="margin-bottom: 20px;"> |
|
|
|
<span class="item_text"><span class="icon">*</span>第二代码:</span> |
|
|
|
<el-input v-model="formobj.businessLicenseNo" placeholder="" class="item_input" clearable /> |
|
|
|
<el-input v-model="formobj.secondCode" placeholder="" class="item_input" clearable /> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
|
|
|
@ -68,57 +72,155 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/supervise/supplierbankinfo' |
|
|
|
import req from '@/api/supervise/commodityFile' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
export default { |
|
|
|
name: 'SupplierBankInfoIndex', |
|
|
|
components: { |
|
|
|
ButtonBar, |
|
|
|
Pagination, |
|
|
|
pageye |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
submitdisabled: false, |
|
|
|
state_list: [{ |
|
|
|
dictKey: 0, |
|
|
|
dictValue: '藕粉' |
|
|
|
}, { |
|
|
|
dictKey: 1, |
|
|
|
dictValue: '通过审核' |
|
|
|
}, |
|
|
|
{ |
|
|
|
dictKey: 2, |
|
|
|
dictValue: '等待审核' |
|
|
|
dictValue: '杏仁' |
|
|
|
}], |
|
|
|
state_list2: [{ |
|
|
|
dictKey: 0, |
|
|
|
dictValue: '金河' |
|
|
|
}, |
|
|
|
{ |
|
|
|
dictKey: 3, |
|
|
|
dictValue: '审核被拒' |
|
|
|
dictKey: 1, |
|
|
|
dictValue: '优宝' |
|
|
|
} |
|
|
|
], |
|
|
|
formobj: { |
|
|
|
name:"", |
|
|
|
code:"", |
|
|
|
brand :"", |
|
|
|
category :"", |
|
|
|
newestPurchasePrice:"", |
|
|
|
secondCode:"" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showAdd() { |
|
|
|
|
|
|
|
}, |
|
|
|
showEdit(row) { |
|
|
|
req.CommodityFetchBySid(row.sid) |
|
|
|
.then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
console.log("data>>>", resp.data) |
|
|
|
this.formobj = resp.data |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
this.formobj = row |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
categoryChange(val) { |
|
|
|
const chose = this.state_list.filter((item) => item.dictKey === val) |
|
|
|
this.formobj.category = chose[0].dictValue |
|
|
|
|
|
|
|
}, |
|
|
|
brandChange(val) { |
|
|
|
const chose = this.state_list2.filter((item) => item.dictKey === val) |
|
|
|
this.formobj.brand = chose[0].dictValue |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
|
|
|
|
console.log("data>>>", this.formobj) |
|
|
|
|
|
|
|
if (this.formobj.name == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "商品名称不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.formobj.code == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "商品编码不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.category == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "商品分类不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.brand == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "商品品牌不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.newestPurchasePrice == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "进货单价不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.secondCode == "") { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: "第二代码不能为空" |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
req.saveCommodity(this.formobj) |
|
|
|
.then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: resp.msg |
|
|
|
}) |
|
|
|
this.handleReturn("true") |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.formobj = { |
|
|
|
sid: '', |
|
|
|
name: '', |
|
|
|
codeUnified: '', |
|
|
|
contacts: '', |
|
|
|
telephone: '', |
|
|
|
address: '', |
|
|
|
bankAccount: '', |
|
|
|
bankAccountNumber: '', |
|
|
|
bankName: '', |
|
|
|
legalRepresentative: '', |
|
|
|
businessLicenseNo: '', |
|
|
|
businessLicenseFiles: [], |
|
|
|
contractFiles: [], |
|
|
|
supplierContractInfoDto: { |
|
|
|
handledBy: '', |
|
|
|
signingOrganization: '', |
|
|
|
contractNo: '', |
|
|
|
contractValidity: '', |
|
|
|
signingDepartment: '', |
|
|
|
signatory: '', |
|
|
|
contractPrice: '', |
|
|
|
supplierSid: '' |
|
|
|
} |
|
|
|
name:"", |
|
|
|
code:"", |
|
|
|
brand :"", |
|
|
|
category :"", |
|
|
|
newestPurchasePrice:"", |
|
|
|
secondCode:"" |
|
|
|
|
|
|
|
} |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
@ -126,5 +228,64 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
<style lang="scss"> |
|
|
|
.box-card { |
|
|
|
min-width: 70%; |
|
|
|
margin-top: 20px; |
|
|
|
|
|
|
|
.item { |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
align-items: center; |
|
|
|
margin-top: 20px; |
|
|
|
height: 40px; |
|
|
|
line-height: 40px; |
|
|
|
|
|
|
|
.item_text { |
|
|
|
flex: 0.8; |
|
|
|
font-size: 18px; |
|
|
|
text-align: right; |
|
|
|
} |
|
|
|
|
|
|
|
.item_input { |
|
|
|
flex: 4; |
|
|
|
font-size: 16px; |
|
|
|
margin-left: 10px; |
|
|
|
margin-right: 80px; |
|
|
|
} |
|
|
|
|
|
|
|
.item_left_input { |
|
|
|
width: 20%; |
|
|
|
} |
|
|
|
|
|
|
|
.item_left_text { |
|
|
|
height: 30px; |
|
|
|
margin-left: 20px; |
|
|
|
line-height: 30px; |
|
|
|
color: #018AD2; |
|
|
|
padding: 0px 15px; |
|
|
|
border: 1.5px solid #018AD2; |
|
|
|
border-radius: 5px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.item_right { |
|
|
|
flex: 1; |
|
|
|
justify-items: center; |
|
|
|
|
|
|
|
.item_right_list_text { |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.item_right_list_delect { |
|
|
|
color: #5E94FF; |
|
|
|
margin-left: 20px; |
|
|
|
font-size: 16px; |
|
|
|
text-decoration: underline; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|