|
|
@@ -66,19 +66,39 @@
|
|
|
<td>
|
|
|
<input class="checkItem" type="checkbox" :value="procurement.id">
|
|
|
</td>
|
|
|
- <td><span>@{{ procurement.code }}</span></td>
|
|
|
+ <td><span class="text-center">@{{ procurement.code }}</span></td>
|
|
|
<td>
|
|
|
+ <span v-if="procurement_status[procurement.status]!='订单取消'">
|
|
|
+ <span class="btn btn-sm btn-outline-secondary" v-if="procurement.status<3"
|
|
|
+ @click="cancel(procurement.id,procurement.type,procurement.code)">取消</span>
|
|
|
+ @can('采购管理-采购-提前确定')
|
|
|
+ <span class="btn btn-sm btn-outline-success" v-if="procurement_type[procurement.type]=='询价单' && procurement.status==1"
|
|
|
+ @click="initiateProcurement(procurement)">发起采购</span>
|
|
|
+ <span class="btn btn-sm btn-outline-info" v-if="procurement_type[procurement.type]=='采购单' && procurement.status==1"
|
|
|
+ @click="initiateProcurement(procurement)">提前确定</span>
|
|
|
+ @else
|
|
|
+ <span class="btn btn-sm btn-outline-success" v-if="procurement_type[procurement.type]=='询价单' && procurement.isFinishEnquiry"
|
|
|
+ @click="initiateProcurement(procurement)">发起采购</span>
|
|
|
+{{-- <span class="btn btn-sm btn-outline-info" v-if="procurement_type[procurement.type]=='采购单' && procurement.status==1"--}}
|
|
|
+{{-- @click="initiateProcurement(procurement)">提前确定</span>--}}
|
|
|
+ @endcan
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ <td class="text-center">
|
|
|
+ <span :class="[procurement.type==1?'text-info font-weight-bold':procurement.type==2?'text-success font-weight-bold':'']">@{{ procurement_type[procurement.type] }}</span>
|
|
|
+ </td>
|
|
|
+ <td class="text-center">
|
|
|
<span :class="[procurement.status==10?'text-danger font-weight-bold':procurement.status==9?'text-success font-weight-bold':'']" >@{{ procurement_status[procurement.status] }}</span>
|
|
|
</td>
|
|
|
- <td><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.name }}</span></td>
|
|
|
- <td>@{{ procurement_type[procurement.type] }}</td>
|
|
|
+
|
|
|
+ <td class="text-center text-muted"><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.name }}</span></td>
|
|
|
{{-- <td><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.customer? procurement.owner_material.owner.customer.company_name:'' }}</span></td>--}}
|
|
|
- <td class="tooltipTarget" style="max-width: 200px;overflow:hidden"><span v-if="procurement.owner_material">@{{ procurement.owner_material.material_code }}</span></td>
|
|
|
- <td><span v-if="procurement.owner_material.material">@{{ procurement.owner_material.material.name }}</span></td>
|
|
|
- <td><span v-if="procurement.owner_material">@{{ procurement.owner_material.size }}</span></td>
|
|
|
- <td><span v-if="procurement.owner_material">@{{ procurement.owner_material.special }}</span></td>
|
|
|
- <td><span v-if="procurement.owner_material">@{{ procurement.owner_material.specification }}</span></td>
|
|
|
- <td>
|
|
|
+ <td class="tooltipTarget text-center" style="max-width: 200px;overflow:hidden"><span v-if="procurement.owner_material">@{{ procurement.owner_material.material_code }}</span></td>
|
|
|
+ <td class="text-center text-muted"><span v-if="procurement.owner_material.material">@{{ procurement.owner_material.material.name }}</span></td>
|
|
|
+ <td class="text-center"><span v-if="procurement.owner_material">@{{ procurement.owner_material.size }}</span></td>
|
|
|
+ <td class="text-center text-muted"><span v-if="procurement.owner_material">@{{ procurement.owner_material.special }}</span></td>
|
|
|
+ <td class="text-center"><span v-if="procurement.owner_material">@{{ procurement.owner_material.specification }}</span></td>
|
|
|
+ <td class="text-center">
|
|
|
<div class="align-center text-center" >
|
|
|
<span v-if="procurement.owner_material.file">
|
|
|
<a target='_blank' :href="getDownFileUrl(procurement.owner_material)" class="text-primary text-decoration is-hover" style="cursor: default" >
|
|
|
@@ -88,27 +108,31 @@
|
|
|
<span v-else>-</span>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td>
|
|
|
+{{-- <td>--}}
|
|
|
{{-- <span v-if="procurement_type[procurement.type]=='询价单' && procurement.supplier" >@{{ procurement.supplier.name ?? '' }}</span>--}}
|
|
|
- <span v-if="procurement.supplier">@{{ procurement.supplier.name ?? '' }}</span>
|
|
|
+{{-- <span v-if="procurement.supplier">@{{ procurement.supplier.name ?? '' }}</span>--}}
|
|
|
+{{-- </td>--}}
|
|
|
+ <td class="text-center" style="min-width: 80px">
|
|
|
+ <div :class="procurement.procurement_quotations&&procurement.procurement_quotations.length==1 ? '' : 'up'" :id="'procurement_quotation-'+i">
|
|
|
+ <div v-for="procurement_quotation in procurement.procurement_quotations" class="row">
|
|
|
+ <div class="col-6 border border-1"><span v-if="procurement_quotation.supplier">@{{ procurement_quotation.supplier.name }}</span></div>
|
|
|
+ <div class="col-6 border border-1">@{{ procurement_quotation.offer }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row text-center cursor-pointer" v-if="procurement.procurement_quotations&&procurement.procurement_quotations.length>1">
|
|
|
+ <b @click="unfold(i)" class="col-12 cursor-pointer" v-if="!upList[i]">共有 @{{ procurement.procurement_quotations.length }} 家报价,<template v-for="(item,i) in procurement.procurement_quotations">价格@{{ i+1 }}:@{{ item.offer }} </template>点击展开</b>
|
|
|
+ <b class="col-12" @click="unfold(i)" v-else>点击收起明细</b>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
- <td>@{{ procurement.quantity }}</td>
|
|
|
- <td>
|
|
|
+ <td class="text-center">@{{ procurement.quantity }}</td>
|
|
|
+{{-- <td>--}}
|
|
|
{{-- <span v-if="procurement_type[procurement.type]=='询价单'">@{{ procurement.cost_price }}</span>--}}
|
|
|
- <span >@{{ procurement.cost_price }}</span>
|
|
|
- </td>
|
|
|
- <td><span>@{{ procurement.unit_price }}</span></td>
|
|
|
- <td><span v-if="procurement.deliver_amount">@{{ procurement.deliver_amount }}</span></td>
|
|
|
- <td><span>@{{ procurement.quantity*procurement.unit_price }}</span></td>
|
|
|
- <td><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.customer? procurement.owner_material.owner.customer.phone:'' }}</span></td>
|
|
|
- <td>
|
|
|
- <span v-if="procurement_status[procurement.status]!='订单取消'">
|
|
|
- <span class="btn btn-sm btn-outline-danger" v-if="procurement.status<3"
|
|
|
- @click="cancel(procurement.id,procurement.type,procurement.code)">取消</span>
|
|
|
- <span class="btn btn-sm btn-outline-success" v-if="procurement_type[procurement.type]=='询价单' && procurement.isFinishEnquiry"
|
|
|
- @click="initiateProcurement(procurement)">发起采购</span>
|
|
|
- </span>
|
|
|
- </td>
|
|
|
+{{-- <span >@{{ procurement.cost_price }}</span>--}}
|
|
|
+{{-- </td>--}}
|
|
|
+ <td class="text-center"><span>@{{ procurement.unit_price }}</span></td>
|
|
|
+ <td class="text-center"><span v-if="procurement.deliver_amount">@{{ procurement.deliver_amount }}</span></td>
|
|
|
+ <td class="text-center"><span>@{{ procurement.quantity*procurement.unit_price }}</span></td>
|
|
|
+ <td class="text-muted"><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.customer? procurement.owner_material.owner.customer.phone:'' }}</span></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
<div class="text-info h5 btn btn">{{$procurements->count()}}/@{{ sum }}</div>
|
|
|
@@ -173,8 +197,10 @@
|
|
|
errors: {},
|
|
|
selectTr:'',
|
|
|
createdProcurement:{},
|
|
|
+ upList:{},
|
|
|
},
|
|
|
mounted: function () {
|
|
|
+ $(".up").slideUp();
|
|
|
$(".tooltipTarget").tooltip({'trigger': 'hover'});
|
|
|
$('#list').removeClass('d-none');
|
|
|
let data = [
|
|
|
@@ -202,9 +228,10 @@
|
|
|
this.form.init();
|
|
|
let column = [
|
|
|
{name: 'code', value: '采购编号', neglect: true,class: 'text-center'},
|
|
|
+ {name: '操作', value: '操作', neglect: true,class: 'text-center'},
|
|
|
+ {name: 'type', value: '单据类型', class: 'text-center'},
|
|
|
{name: '采购单状态', value: '采购单状态', neglect: true,class: 'text-center'},
|
|
|
{name: 'owner_id', value: '项目', class: 'text-center'},
|
|
|
- {name: 'type', value: '单据类型', class: 'text-center'},
|
|
|
// {name: 'company_name', value: '采购公司', class: 'text-center'},
|
|
|
{name: 'material_code', value: '耗材编号', class: 'text-center'},
|
|
|
{name: 'material_name', value: '耗材'},
|
|
|
@@ -212,14 +239,17 @@
|
|
|
{name: 'special', value: '特殊要求', class: 'text-center'},
|
|
|
{name: 'specification', value: '材质规格', class: 'text-center'},
|
|
|
{name: '附件', value: '附件', class: 'text-center'},
|
|
|
- {name: 'supplier', value: '供应商', class: 'text-center'},
|
|
|
+ // {name: 'supplier', value: '供应商', class: 'text-center'},
|
|
|
+ {name:"price",type:"multi",title:"报价信息",rows:[
|
|
|
+ {value:"供应商",col:"6"},
|
|
|
+ {value:"采购单价(元)",col:"6"},
|
|
|
+ ]},
|
|
|
{name: 'quantity', value: '采购数量', neglect: true,class: 'text-center'},
|
|
|
- {name: 'offer', value: '采购单价(元)', neglect: true,class: 'text-center'},
|
|
|
+ // {name: 'offer', value: '采购单价(元)', neglect: true,class: 'text-center'},
|
|
|
{name: 'unit_price', value: '销售单价(元)', neglect: true,class: 'text-center'},
|
|
|
{name: '送货数量', value: '送货数量', neglect: true,class: 'text-center'},
|
|
|
{name: '销售总价', value: '销售总价(元)', neglect: true,class: 'text-center'},
|
|
|
{name: '联系方式', value: '联系方式', neglect: true,class: 'text-center'},
|
|
|
- {name: '操作', value: '操作', neglect: true,class: 'text-center'},
|
|
|
];
|
|
|
|
|
|
new Header({
|
|
|
@@ -271,6 +301,20 @@
|
|
|
window.tempTip.show("网络错误:" + err);
|
|
|
});
|
|
|
},
|
|
|
+ unfold(index){
|
|
|
+ this.$set(this.upList,index,this.upList[index] ? !this.upList[index] : true);
|
|
|
+ $("#procurement_quotation-"+index).slideToggle();
|
|
|
+ },
|
|
|
+ show(id,$e){
|
|
|
+ $("#"+id).slideToggle();
|
|
|
+ let value= $($e.target).html();
|
|
|
+ if(value=== '点击展开'){
|
|
|
+ value = '点击收起';
|
|
|
+ }else if(value === '点击收起'){
|
|
|
+ value ='点击展开'
|
|
|
+ }
|
|
|
+ $($e.target).html(value);
|
|
|
+ },
|
|
|
owner_seek: function (e) {
|
|
|
let _this = this;
|
|
|
let $val = e.target.value;
|