|
|
|
@ -34,36 +34,6 @@
|
|
|
|
|
placeholder="请选择" clearable field="costomerCode" interfaceId="398016916830126469" :columnOptions="costomerCodecolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
>
|
|
|
|
|
<!--=======-->
|
|
|
|
|
<!-- <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body-->
|
|
|
|
|
<!-- :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">-->
|
|
|
|
|
<!-- <el-row :gutter="15" class="">-->
|
|
|
|
|
<!-- <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">-->
|
|
|
|
|
<!-- <template v-if="!loading">-->
|
|
|
|
|
<!-- <el-col :span="8">-->
|
|
|
|
|
<!-- <el-form-item label="单据编号" prop="documentNo">-->
|
|
|
|
|
<!-- <el-input v-model="dataForm.documentNo" placeholder="系统自动生成" readonly>-->
|
|
|
|
|
|
|
|
|
|
<!-- </el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="8">-->
|
|
|
|
|
<!-- <el-form-item label="合同名称" prop="contractName">-->
|
|
|
|
|
<!-- <popupSelect v-model="dataForm.contractName" placeholder="请选择" clearable field="contractName"-->
|
|
|
|
|
<!-- interfaceId="391146878474963333" :columnOptions="contractNamecolumnOptions" propsValue="contract_name"-->
|
|
|
|
|
<!-- relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"-->
|
|
|
|
|
<!-- @change="popupSelectChange">-->
|
|
|
|
|
|
|
|
|
|
<!-- </popupSelect>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :span="8">-->
|
|
|
|
|
<!-- <el-form-item label="币别" prop="currency">-->
|
|
|
|
|
<!-- <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>-->
|
|
|
|
|
<!-- <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"-->
|
|
|
|
|
<!-- :disabled="item.disabled"></el-option>-->
|
|
|
|
|
<!-->>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3-->
|
|
|
|
|
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -131,91 +101,7 @@
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="8" >
|
|
|
|
|
<el-form-item label="已回款金额"
|
|
|
|
|
prop="amountCollected" >
|
|
|
|
|
<el-input v-model="dataForm.amountCollected"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="发票数量"
|
|
|
|
|
prop="invoiceNum" >
|
|
|
|
|
<el-input v-model="dataForm.invoiceNum"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="发票金额"
|
|
|
|
|
prop="invoiceAmount" >
|
|
|
|
|
<el-input v-model="dataForm.invoiceAmount"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="单据状态 "
|
|
|
|
|
prop="status" >
|
|
|
|
|
<el-select v-model="dataForm.status"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="ERP订单号"
|
|
|
|
|
prop="erpNo" >
|
|
|
|
|
<el-input v-model="dataForm.erpNo"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
=======
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="来源系统" prop="sourceSystem">
|
|
|
|
|
<el-select v-model="dataForm.sourceSystem" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in sourceSystemOptions" :key="index" :label="item.fullName"
|
|
|
|
|
:value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="单据状态 " prop="status">
|
|
|
|
|
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
|
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
|
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="制单人"
|
|
|
|
|
prop="creatorUserName" >
|
|
|
|
|
<el-input v-model="dataForm.creatorUserName"
|
|
|
|
|
placeholder="系统自动生成" readonly >
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="制单时间"
|
|
|
|
|
prop="creatorTime" >
|
|
|
|
|
<el-input v-model="dataForm.creatorTime"
|
|
|
|
|
placeholder="系统自动生成" readonly >
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>-->
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-tabs v-model="activemtmitd" tab-position="top" class="mb-20">
|
|
|
|
|
<el-tab-pane label="磅单信息">
|
|
|
|
@ -226,7 +112,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="dataForm.salesorder_item0List" size='mini' show-summary :summary-method="getSummaries" >
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center" />
|
|
|
|
|
<el-table-column prop="vehicleId" label="车号">
|
|
|
|
|
<el-table-column prop="vehicleId" label="车号" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<popupSelect v-model="scope.row.vehicleId"
|
|
|
|
|
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="391151974030035653"
|
|
|
|
@ -236,7 +122,7 @@
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="materialId" label="物料名称">
|
|
|
|
|
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<popupSelect v-model="scope.row.materialId"
|
|
|
|
|
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398108817931470725" :columnOptions="salesorder_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
|
|
|
@ -245,7 +131,7 @@
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="poundType" label="类型">
|
|
|
|
|
<el-table-column prop="poundType" label="类型" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.poundType"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
@ -253,14 +139,14 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="netWeight" label="净重">
|
|
|
|
|
<el-table-column prop="netWeight" label="净重" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.netWeight"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="unit" label="单位">
|
|
|
|
|
<el-table-column prop="unit" label="单位" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.unit"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
@ -268,7 +154,7 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="advance" label="是否垫资">
|
|
|
|
|
<el-table-column prop="advance" label="是否垫资" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.advance"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
@ -276,21 +162,21 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="unitPrice" label="单价">
|
|
|
|
|
<el-table-column prop="unitPrice" label="单价" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.unitPrice"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}' @change="editUnitPrice(scope.row)">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="settlement" label="结算重量">
|
|
|
|
|
<el-table-column prop="settlement" label="结算重量" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.settlement"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="rate" label="税率 ">
|
|
|
|
|
<el-table-column prop="rate" label="税率 " align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.rate"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' @change="computeNoPrice">
|
|
|
|
@ -298,21 +184,21 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="price" label="金额">
|
|
|
|
|
<el-table-column prop="price" label="金额" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.price"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="noPrice" label="不含税金额">
|
|
|
|
|
<el-table-column prop="noPrice" label="不含税金额" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.noPrice"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
|
|
<el-table-column prop="remark" label="备注" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.remark"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
@ -730,7 +616,6 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
// <<<<<<< HEAD
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
@ -810,6 +695,51 @@
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
editUnitPrice(row){
|
|
|
|
|
debugger
|
|
|
|
|
var advanceAmount = 0;
|
|
|
|
|
var price = 0;
|
|
|
|
|
var notPrice = 0;
|
|
|
|
|
this.dataForm.salesorder_item0List.forEach((item, index)=>{
|
|
|
|
|
if(row.vehicleId == item.vehicleId){
|
|
|
|
|
debugger
|
|
|
|
|
if (item.remark == null || item.remark === ""){
|
|
|
|
|
debugger
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '请在备注说明修改单价原因',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
item.price = parseFloat(item.settlement) * parseFloat(item.unitPrice);//子表金额
|
|
|
|
|
this.taxRateOptions.forEach((item2)=>{
|
|
|
|
|
if(item2.id == row.rate){
|
|
|
|
|
item.noPrice = item.price * (100 - item2.fullName) / 100;//子表不含税金额
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// request({
|
|
|
|
|
// url: '/api/saleorder/Saleorderitem/updatePrice'+row.poundlistId,
|
|
|
|
|
// method: 'PUT',
|
|
|
|
|
// data: item.price
|
|
|
|
|
// }).then((res) => {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: res.msg,
|
|
|
|
|
// type: 'success',
|
|
|
|
|
// duration: 1000,
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
if(item.advance == '1'){//垫资
|
|
|
|
|
advanceAmount = advanceAmount + item.price;//垫资金额
|
|
|
|
|
}
|
|
|
|
|
price = price + item.price;//主表金额
|
|
|
|
|
notPrice = notPrice + parseFloat(item.noPrice);//主表不含税金额
|
|
|
|
|
});
|
|
|
|
|
this.dataForm.advanceAmount = advanceAmount;
|
|
|
|
|
this.dataForm.price = price;
|
|
|
|
|
this.dataForm.notPrice = notPrice;
|
|
|
|
|
},
|
|
|
|
|
computeNoPrice(){
|
|
|
|
|
let notPrice = 0;
|
|
|
|
|
for (let i = 0;i<this.dataForm.salesorder_item0List.length;i++) {
|
|
|
|
|