|
@@ -58,11 +58,11 @@
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="15">
|
|
|
<el-form-item label="备注说明" prop="notes">
|
|
|
- <el-input type="textarea"
|
|
|
- v-model="dataForm.notes"
|
|
|
- :rows="4"
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-model="dataForm.notes"
|
|
|
+ :rows="4"
|
|
|
maxlength="300"
|
|
|
- show-word-limit
|
|
|
+ show-word-limit
|
|
|
placeholder="备注说明"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -70,7 +70,7 @@
|
|
|
<el-row class="my-row">
|
|
|
<upload-component :title="'附件'" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/>
|
|
|
</el-row>
|
|
|
-
|
|
|
+
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="onChose">取消</el-button>
|
|
@@ -81,6 +81,7 @@
|
|
|
|
|
|
<script>
|
|
|
import uploadComponent from '../common/upload-component'
|
|
|
+import { getSupplierAccountDetail } from '@/api/finance'
|
|
|
export default {
|
|
|
name: 'supplier-account-add-or-update',
|
|
|
components: {
|
|
@@ -131,7 +132,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
- console.log(5555)
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
async init (id, supplierAccount, supplierId, formDisable) {
|
|
@@ -140,47 +140,22 @@ export default {
|
|
|
this.formDisable = formDisable
|
|
|
this.fileList = []
|
|
|
if (id && supplierAccount) {
|
|
|
- this.dataForm = {
|
|
|
- supplierAccountId: id,
|
|
|
- supplierAccountCode: supplierAccount.supplierAccountCode,
|
|
|
- type: supplierAccount.type,
|
|
|
- contractNumber: supplierAccount.contractNumber,
|
|
|
- receivedPaidTime: supplierAccount.receivedPaidTime,
|
|
|
- currency: supplierAccount.currency,
|
|
|
- receivedPaidAmount: supplierAccount.receivedPaidAmount,
|
|
|
- notes: supplierAccount.notes
|
|
|
- }
|
|
|
- supplierAccount.attachList && supplierAccount.attachList.forEach((item) => {
|
|
|
- this.fileList.push({
|
|
|
- name: item.fileName,
|
|
|
- url: item.url,
|
|
|
- id: item.url
|
|
|
- })
|
|
|
+ getSupplierAccountDetail(id).then(({ data }) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.dataForm = data.data
|
|
|
+ }
|
|
|
+ if (data.data.attachList) {
|
|
|
+ data.data.attachList.forEach((item) => {
|
|
|
+ this.fileList.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
this.dataForm.supplierId = supplierId
|
|
|
- // await getCustomer().then(({data}) => {
|
|
|
- // if (data && data.code === '200') {
|
|
|
- // this.optionsCus = data.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- // if (!id) return
|
|
|
- // await getSaleInvoiceDetail(this.id).then(({data}) => {
|
|
|
- // if (data && data.code === '200') {
|
|
|
- // this.dataForm = data.data
|
|
|
- // // 文件列表
|
|
|
- // this.fileList = []
|
|
|
- // if (data.data.attachList) {
|
|
|
- // data.data.attachList.forEach((item) => {
|
|
|
- // this.fileList.push({
|
|
|
- // name: item.fileName,
|
|
|
- // url: item.url,
|
|
|
- // id: item.url
|
|
|
- // })
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
validateField (type) {
|
|
|
this.$refs.dataForm.validateField(type)
|
|
@@ -203,7 +178,6 @@ export default {
|
|
|
this.$message.error('请上传文件')
|
|
|
return
|
|
|
}
|
|
|
- // let finSalesInvoice = {finSalesInvoice: this.dataForm}
|
|
|
this.$http({
|
|
|
url: !this.id ? this.$http.adornUrl(`/biz-service/finance/supplier/account/save`) : this.$http.adornUrl(`/biz-service/finance/supplier/account/update`),
|
|
|
method: 'post',
|