|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<el-button type="primary" size="small" @click="drawer = true">新建物流单</el-button>
|
|
<el-button type="primary" size="small" @click="drawer = true">新建物流单</el-button>
|
|
|
<el-drawer
|
|
<el-drawer
|
|
|
- title="创建物流单"
|
|
|
|
|
|
|
+ title="新建物流单"
|
|
|
:visible.sync="drawer"
|
|
:visible.sync="drawer"
|
|
|
direction="rtl"
|
|
direction="rtl"
|
|
|
size="80%"
|
|
size="80%"
|
|
@@ -11,8 +11,8 @@
|
|
|
<div class="drawer__panel">
|
|
<div class="drawer__panel">
|
|
|
<p class="normal-title normal-margin">基础信息</p>
|
|
<p class="normal-title normal-margin">基础信息</p>
|
|
|
<el-form :inline="true" :model="form" class="demo-form-inline" size="small" label-width="100px" label-position="right">
|
|
<el-form :inline="true" :model="form" class="demo-form-inline" size="small" label-width="100px" label-position="right">
|
|
|
- <el-form-item label="经销商名称">
|
|
|
|
|
- <enterprise ref="ent" @rowClick="entRowClick"></enterprise>
|
|
|
|
|
|
|
+ <el-form-item label="企业名称" prop="">
|
|
|
|
|
+ <enterprise :qiyi="true" ref="ent" @rowClick="entRowClick"></enterprise>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="物流公司">
|
|
<el-form-item label="物流公司">
|
|
|
<logisticcom ref="logis" @logisticRowClick="logisticRowClick"></logisticcom>
|
|
<logisticcom ref="logis" @logisticRowClick="logisticRowClick"></logisticcom>
|
|
@@ -32,9 +32,21 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="车牌号">
|
|
|
|
|
+ <el-input v-model.number="form.carnum" placeholder="车牌号"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="物流联系人">
|
|
|
|
|
+ <el-input v-model.number="form.logiscontact" placeholder="物流联系人"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="物流电话">
|
|
|
|
|
+ <el-input v-model.number="form.logisphone" placeholder="物流电话"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="运费">
|
|
<el-form-item label="运费">
|
|
|
<el-input v-model.number="form.freightamount" placeholder="运费"></el-input>
|
|
<el-input v-model.number="form.freightamount" placeholder="运费"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="备注">
|
|
|
|
|
+ <el-input v-model.number="form.remarks" placeholder="运费"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="单据日期">
|
|
<el-form-item label="单据日期">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="form.billdate"
|
|
v-model="form.billdate"
|
|
@@ -86,7 +98,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import dispatchTable from './dispatchTable.vue'
|
|
import dispatchTable from './dispatchTable.vue'
|
|
|
-import enterprise from '@/template/enterprise/index.vue'
|
|
|
|
|
|
|
+import enterprise from './enterprise'
|
|
|
import logisticcom from '@/template/selectLogisticcom/index.vue'
|
|
import logisticcom from '@/template/selectLogisticcom/index.vue'
|
|
|
import addDisbill from '@/template/logisyticCanUseDisBill/index.vue'
|
|
import addDisbill from '@/template/logisyticCanUseDisBill/index.vue'
|
|
|
export default {
|
|
export default {
|
|
@@ -103,8 +115,24 @@ export default {
|
|
|
dialogAddress:false,
|
|
dialogAddress:false,
|
|
|
setcol:24,
|
|
setcol:24,
|
|
|
form:{
|
|
form:{
|
|
|
- paytype:"到付",
|
|
|
|
|
- billdate:new Date()
|
|
|
|
|
|
|
+ "freightamount": "",
|
|
|
|
|
+ "logisticno": "",
|
|
|
|
|
+ "paytype": "",
|
|
|
|
|
+ "remarks": "",
|
|
|
|
|
+ "sa_dispatchids": [],
|
|
|
|
|
+ "sa_logiscompid": 0,
|
|
|
|
|
+ "sa_logisticsid": 0,
|
|
|
|
|
+ "sys_enterpriseid": '',
|
|
|
|
|
+ "carnum":"",
|
|
|
|
|
+ "logisphone":"",
|
|
|
|
|
+ "logiscontact":"",
|
|
|
|
|
+ "rec_contactsid":'',
|
|
|
|
|
+ billdate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}`
|
|
|
|
|
+ },
|
|
|
|
|
+ rules:{
|
|
|
|
|
+ point:[
|
|
|
|
|
+ { required: true, message: '请选择账期依据', trigger: 'change'},
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
enterpriseInfo:null,
|
|
enterpriseInfo:null,
|
|
|
rec_address:[],
|
|
rec_address:[],
|
|
@@ -126,6 +154,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
entRowClick (row) {
|
|
entRowClick (row) {
|
|
|
this.enterpriseInfo = row
|
|
this.enterpriseInfo = row
|
|
|
|
|
+ this.form.sys_enterpriseid = row.sys_enterpriseid
|
|
|
},
|
|
},
|
|
|
logisticRowClick (row) {
|
|
logisticRowClick (row) {
|
|
|
console.log(row)
|
|
console.log(row)
|
|
@@ -139,24 +168,15 @@ export default {
|
|
|
this.$refs['dislist'].tableData = unique([...this.$refs['dislist'].tableData,...data],'billno')
|
|
this.$refs['dislist'].tableData = unique([...this.$refs['dislist'].tableData,...data],'billno')
|
|
|
},
|
|
},
|
|
|
async onSubmit () {
|
|
async onSubmit () {
|
|
|
|
|
+ this.form.sa_dispatchids = this.$refs['dislist'].tableData.map(e=>{
|
|
|
|
|
+ return e.sa_dispatchid
|
|
|
|
|
+ })
|
|
|
const res = await this.$api.requested({
|
|
const res = await this.$api.requested({
|
|
|
"id": "202212004124804",
|
|
"id": "202212004124804",
|
|
|
- "content": {
|
|
|
|
|
- "sa_logisticsid": 0,
|
|
|
|
|
- "sys_enterpriseid": this.enterpriseInfo.sys_enterpriseid,
|
|
|
|
|
- "sa_logiscompid": this.form.sa_logiscompid,
|
|
|
|
|
- "remarks": "",
|
|
|
|
|
- "logisticno": "",
|
|
|
|
|
- "paytype": this.form.paytype,
|
|
|
|
|
- // "freightstatus": this.form.paytype,
|
|
|
|
|
- "billdate":this.form.billdate,
|
|
|
|
|
- "freightamount":this.form.freightamount,
|
|
|
|
|
- "sa_dispatchids":this.$refs['dislist'].tableData.map(e=>{
|
|
|
|
|
- return e.sa_dispatchid
|
|
|
|
|
- }),
|
|
|
|
|
- "rec_contactsid":this.form.rec_contactsid
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ "content": this.form
|
|
|
})
|
|
})
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+
|
|
|
if (Array.isArray(res.data)) {
|
|
if (Array.isArray(res.data)) {
|
|
|
this.dialogAddress = true
|
|
this.dialogAddress = true
|
|
|
this.rec_address = res.data
|
|
this.rec_address = res.data
|
|
@@ -168,6 +188,7 @@ export default {
|
|
|
this.form = {}
|
|
this.form = {}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ this.$router.push({path:'/logisticsdetail',query:{id:res.data.sa_logisticsid,rowindex:res.data.rowindex}})
|
|
|
},
|
|
},
|
|
|
selectAddress (row) {
|
|
selectAddress (row) {
|
|
|
this.form.rec_contactsid = row.rec_contactsid
|
|
this.form.rec_contactsid = row.rec_contactsid
|