优化采购和报修完结细节问题

This commit is contained in:
xiaogang 2021-05-27 09:41:04 +08:00
parent 2f7571621d
commit 4274a9ba9d
11 changed files with 59 additions and 18 deletions

View File

@ -21,7 +21,7 @@
<th class="text-center">参考价格</th>
<th class="text-center">物品库存</th>
<th class="text-center">申请数量</th>
<th class="text-center" v-if="viewResourceStoreInfo2.resOrderType == '10000'">供应商</th>
<!-- <th class="text-center" v-if="viewResourceStoreInfo2.resOrderType == '10000'">供应商</th> -->
<th class="text-center">备注</th>
<th class="text-center">操作</th>
</tr>
@ -38,13 +38,13 @@
<input v-model="resourceStore.quantity" type="number" placeholder="必填,请填写申请数量"
class="form-control">
</td>
<td class="text-center" v-if="viewResourceStoreInfo2.resOrderType == '10000'">
<!-- <td class="text-center" v-if="viewResourceStoreInfo2.resOrderType == '10000'">
<select class="form-control" name="" id="" v-model="resourceStore.rsId">
<option value="" selected>请选择</option>
<option v-for="supplier in viewResourceStoreInfo2.resourceSuppliers" :value="supplier.rsId">{{supplier.supplierName}}
</option>
</select>
</td>
</td> -->
<td class="text-center">
<input v-model="resourceStore.remark" type="text" class="form-control">
</td>

View File

@ -24,7 +24,7 @@
_initMethod: function () {
//根据请求参数查询 查询 业主信息
vc.component._loadResourceStoreInfoData();
vc.component._loadResourceSuppliers();
// vc.component._loadResourceSuppliers();
},
_initEvent: function () {
vc.on('viewResourceStoreInfo2', 'setResourcesOut', function (_resOrderType) {

View File

@ -20,6 +20,7 @@
<th class="text-center">物品编码</th>
<!-- <th class="text-center">物品价格</th> -->
<th class="text-center">物品库存</th>
<th class="text-center">参考单价</th>
<th class="text-center">{{viewResourceStoreInfo3.resOrderType == 10000 ? '采购数量' : '出库数量'}}</th>
<th class="text-center" v-if="viewResourceStoreInfo3.resOrderType == 10000">采购单价</th>
<th class="text-center" v-if="viewResourceStoreInfo3.resOrderType == 10000">供应商</th>
@ -35,6 +36,7 @@
<td class="text-center">{{resourceStore.resCode}}</td>
<!-- <td class="text-center">{{resourceStore.price}}</td> -->
<td class="text-center">{{resourceStore.stock}}</td>
<td class="text-center">{{resourceStore.price}}</td>
<td class="text-center">
<input v-model="resourceStore.purchaseQuantity" type="number" placeholder="必填,请填写数量" class="form-control">
</td>

View File

@ -34,7 +34,9 @@
</div>
<div style="display: inline-block;" v-if="auditOrdersInfo.procure == false">
<div class="btn-group"
v-if="auditOrdersInfo.currentUserId != auditOrder.userId">
v-if="auditOrder.state == 1000 || auditOrder.state == 1001">
<!--auditOrdersInfo.currentUserId != auditOrder.userId-->
<!--当前操作人UserId != 申请人userId-->
<button class="btn-white btn btn-xs"
v-on:click="_openAuditOrderModel(auditOrder)">审批
</button>
@ -47,8 +49,12 @@
</div>
<div class="btn-group" v-else>
<button class="btn-white btn btn-xs"
v-if="auditOrder.state == 1001"
v-on:click="_procureEnterOrder(auditOrder)">采购入库
</button>
<button class="btn-white btn btn-xs" v-else
v-on:click="_finishAuditOrder(auditOrder)">结束
</button>
</div>
</td>
</tr>

View File

@ -34,7 +34,7 @@
</div>
<div style="display: inline-block;" v-if="auditOrdersInfo.procure == false">
<div class="btn-group"
v-if="auditOrdersInfo.currentUserId != auditOrder.userId">
v-if="auditOrder.state == 1000 || auditOrder.state == 1001">
<button class="btn-white btn btn-xs"
v-on:click="_openAuditOrderModel(auditOrder)">审批
</button>
@ -47,8 +47,12 @@
</div>
<div class="btn-group" v-else>
<button class="btn-white btn btn-xs"
v-if="auditOrder.state == 1001"
v-on:click="_distributionOrder(auditOrder)">物品发放
</button>
<button class="btn-white btn btn-xs" v-else
v-on:click="_finishAuditOrder(auditOrder)">结束
</button>
</div>
</td>
</tr>

View File

@ -100,6 +100,7 @@
<th class="text-center">物品类型</th>
<th class="text-center">物品名称</th>
<th class="text-center">物品规格</th>
<th class="text-center">供应商</th>
<th class="text-center">物品编码</th>
<th class="text-center">参考单价</th>
<th class="text-center">原有库存</th>
@ -116,6 +117,7 @@
<td class="text-center">{{resourceStore.rstName ? resourceStore.rstName : '-'}}</td>
<td class="text-center">{{resourceStore.resName}}</td>
<td class="text-center">{{resourceStore.specName ? resourceStore.specName : '-'}}</td>
<td class="text-center">{{resourceStore.supplierName ? resourceStore.supplierName : '-'}}</td>
<td class="text-center">{{resourceStore.resCode}}</td>
<td class="text-center">¥{{resourceStore.price}}</td>
<td class="text-center">{{resourceStore.originalStock}}</td>
@ -129,7 +131,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="12">
<td colspan="13">
<ul class="pagination float-right"></ul>
</td>
</tr>

View File

@ -18,6 +18,7 @@
<th class="text-center">申请数量</th>
<th class="text-center">采购数量</th>
<th class="text-center">采购单价</th>
<th class="text-center">供应商</th>
<th class="text-center">备注</th>
</tr>
</thead>
@ -38,6 +39,14 @@
<input v-model="resourceEnter.price" type="text"
placeholder="必填,请填写采购单价" class="form-control">
</td>
<td class="text-center">
<select class="form-control" name="" id="" v-model="resourceEnter.rsId">
<option value="" selected>请选择</option>
<option v-for="supplier in resourceEnterManageInfo.resourceSuppliers" :value="supplier.rsId">
{{supplier.supplierName}}
</option>
</select>
</td>
<td class="text-center">
<input v-model="resourceEnter.purchaseRemark" type="text" placeholder="可填,请填写备注"
class="form-control">

View File

@ -12,6 +12,7 @@
taskId: '',
resOrderType: '',
purchaseApplyDetailVo: [],
resourceSuppliers: [],
}
},
_initMethod: function () {
@ -19,6 +20,7 @@
vc.component.resourceEnterManageInfo.resOrderType = vc.getParam('resOrderType');
vc.component.resourceEnterManageInfo.taskId = vc.getParam('taskId');
vc.component._listPurchaseApply(DEFAULT_PAGE, DEFAULT_ROWS);
vc.component._loadResourceSuppliers();
},
_initEvent: function () {
},
@ -44,12 +46,28 @@
item.purchaseQuantity = '';
item.price = '';
item.purchaseRemark = '';
item.rsId = '';
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_loadResourceSuppliers() {
var param = {
params: { page: 1, row: 50 }
};
//发送get请求
vc.http.apiGet('resourceSupplier.listResourceSuppliers',
param,
function (json, res) {
var _resourceSupplierManageInfo = JSON.parse(json);
vc.component.resourceEnterManageInfo.resourceSuppliers = _resourceSupplierManageInfo.data;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openDetailResourceEnterModel: function (_resourceEnter) {
vc.jumpToPage("/admin.html#/pages/common/resourceEnterDetail?applyOrderId=" + _resourceEnter.applyOrderId + "&resOrderType=10000");
},

View File

@ -82,7 +82,7 @@
}
let _purchaseQuantity = parseFloat(item.purchaseQuantity).toFixed(2);
let _stock = parseFloat(item.stock).toFixed(2)
if (_purchaseQuantity > _stock) {
if (parseFloat(_purchaseQuantity) > parseFloat(_stock)) {
vc.toast('库存不足');
_flag = false;
return;

View File

@ -114,7 +114,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="7">
<td colspan="8">
<ul class="pagination float-right"></ul>
</td>
</tr>

View File

@ -44,21 +44,21 @@
</button>
</div>
</div>
<div v-if="finishRepairInfo.choosedGoodsList.length > 0">
<div v-if="(finishRepairInfo.maintenanceType == '1001' || finishRepairInfo.maintenanceType == '1003') && finishRepairInfo.choosedGoodsList.length > 0">
<div class="form-group row">
<label class="col-sm-2 col-form-label">使用商品</label>
<div class="col-sm-10">
<div class="row">
<div class="col-sm-3">分类</div>
<div class="col-sm-2">分类</div>
<div class="col-sm-3">商品</div>
<div class="col-sm-2" v-show="finishRepairInfo.maintenanceType == '1001'">
<div class="col-sm-3" v-show="finishRepairInfo.maintenanceType == '1001'">
价格
</div>
<div class="col-sm-2">数量</div>
<div class="col-sm-2">操作</div>
</div>
<div class="row" v-for="(item,index) in finishRepairInfo.choosedGoodsList">
<div class="col-sm-3">
<div class="row" style="margin-bottom: 10px;" v-for="(item,index) in finishRepairInfo.choosedGoodsList">
<div class="col-sm-2">
<input cols="15" class="form-control" disabled="disabled"
v-model="item.rstName">
</div>
@ -70,17 +70,17 @@
<input cols="15" class="form-control" disabled="disabled"
v-model="item.resName">
</div>
<div class="col-sm-2" v-show="finishRepairInfo.maintenanceType == '1001'">
<input cols="15" class="form-control" :disabled="item.outHighPrice == item.outLowPrice"
<div class="col-sm-3" v-show="finishRepairInfo.maintenanceType == '1001'">
<input cols="15" class="form-control" :disabled="!item.isCustom && item.outHighPrice == item.outLowPrice"
v-model="item.price" v-on:input="_updateTotalPrice()">
<span v-show="!item.isCustom && item.outHighPrice != item.outLowPrice">价格范围({{item.outLowPrice}} - {{item.outHighPrice}})</span>
</div>
<div class="col-sm-2">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" v-on:click="_useNumberDec(index)">-</button>
</span>
<input cols="15" class="form-control" :disabled="item.isCustom"
v-model="item.useNumber" v-on:input="_updateTotalPrice()">
<input cols="15" class="form-control" v-model="item.useNumber" v-on:input="_updateTotalPrice()">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" v-on:click="_useNumberInc(index)">+</button>
</span>