采购和销售出入库通知

jg-waiwang-pro
vayne 8 months ago
parent ffe6725747
commit 13130bca2d

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherMapper extends BaseMapper<VoucherEntity> {

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherProductMapper extends BaseMapper<VoucherProductEntity> {

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherVehicleMapper extends BaseMapper<VoucherVehicleEntity> {

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherProductService extends IService<VoucherProductEntity> {
QueryWrapper<VoucherProductEntity> getChild(VoucherPagination pagination,QueryWrapper<VoucherProductEntity> voucherProductQueryWrapper);

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherService extends IService<VoucherEntity> {
List<VoucherEntity> getList(VoucherPagination voucherPagination);

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
public interface VoucherVehicleService extends IService<VoucherVehicleEntity> {
QueryWrapper<VoucherVehicleEntity> getChild(VoucherPagination pagination,QueryWrapper<VoucherVehicleEntity> voucherVehicleQueryWrapper);

@ -513,17 +513,32 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
generaterSwapUtil.swapDatetime(BusinessOrderConstant.getFormData(),businessOrderForm),BusinessOrderForm.class);
BusinessOrderEntity entity = JsonUtil.getJsonToBean(businessOrderForm, BusinessOrderEntity.class);
if(isSave){
String mainId = id ;
entity.setCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setId(mainId);
entity.setFlowId(businessOrderForm.getFlowId());
entity.setVersion(0);
}else{
entity.setCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setFlowId(businessOrderForm.getFlowId());
if (entity.getBusinessType().equals("1")){
if(isSave){
String mainId = id ;
entity.setCode(generaterSwapUtil.getBillNumber("cgdd", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setId(mainId);
entity.setFlowId(businessOrderForm.getFlowId());
entity.setVersion(0);
}else{
entity.setCode(generaterSwapUtil.getBillNumber("cgdd", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setFlowId(businessOrderForm.getFlowId());
}
}else if(entity.getBusinessType().equals("2")){
if(isSave){
String mainId = id ;
entity.setCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setId(mainId);
entity.setFlowId(businessOrderForm.getFlowId());
entity.setVersion(0);
}else{
entity.setCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setCreateOrderDate(DateUtil.getNowDate());
entity.setFlowId(businessOrderForm.getFlowId());
}
}
this.saveOrUpdate(entity);

@ -33,7 +33,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
@Service
public class VoucherProductServiceImpl extends ServiceImpl<VoucherProductMapper, VoucherProductEntity> implements VoucherProductService{

@ -36,7 +36,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
@Service
public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity> implements VoucherService{
@ -226,26 +226,6 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
}
}
if(isPc){
if(ObjectUtil.isNotEmpty(voucherPagination.getTableField111_productId())){
voucherProductNum++;
String value = voucherPagination.getTableField111_productId() instanceof List ?
JsonUtil.getObjectToString(voucherPagination.getTableField111_productId()) :
String.valueOf(voucherPagination.getTableField111_productId());
voucherProductQueryWrapper.lambda().like(VoucherProductEntity::getProductId,value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getVoucherStatus())){
voucherNum++;
String value = voucherPagination.getVoucherStatus() instanceof List ?
JsonUtil.getObjectToString(voucherPagination.getVoucherStatus()) :
String.valueOf(voucherPagination.getVoucherStatus());
voucherQueryWrapper.lambda().like(VoucherEntity::getVoucherStatus,value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getVoucherCode())){
voucherNum++;
@ -308,6 +288,26 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
}
if(ObjectUtil.isNotEmpty(voucherPagination.getBusinessType())){
voucherNum++;
String value = voucherPagination.getBusinessType() instanceof List ?
JsonUtil.getObjectToString(voucherPagination.getBusinessType()) :
String.valueOf(voucherPagination.getBusinessType());
voucherQueryWrapper.lambda().like(VoucherEntity::getBusinessType,value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getDocumentType())){
voucherNum++;
String value = voucherPagination.getDocumentType() instanceof List ?
JsonUtil.getObjectToString(voucherPagination.getDocumentType()) :
String.valueOf(voucherPagination.getDocumentType());
voucherQueryWrapper.lambda().like(VoucherEntity::getDocumentType,value);
}
}
if(voucherProductNum>0){
List<String> voucherProductIdList = voucherProductService.list(voucherProductQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getVoucherId())).map(t->t.getVoucherId()).collect(Collectors.toList());
@ -497,12 +497,12 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
if(isSave){
String mainId = id ;
entity.setVoucherCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setVoucherCode(generaterSwapUtil.getBillNumber("fhpz", false));
entity.setId(mainId);
entity.setFlowId(voucherForm.getFlowId());
entity.setVersion(0);
}else{
entity.setVoucherCode(generaterSwapUtil.getBillNumber("ssdj", false));
entity.setVoucherCode(generaterSwapUtil.getBillNumber("fhpz", false));
entity.setFlowId(voucherForm.getFlowId());
}
this.saveOrUpdate(entity);

@ -33,7 +33,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
@Service
public class VoucherVehicleServiceImpl extends ServiceImpl<VoucherVehicleMapper, VoucherVehicleEntity> implements VoucherVehicleService{

@ -527,7 +527,11 @@ public class BusinessOrderController {
businessOrderMap.put("tableField135",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(settlementInfoList)));
List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
businessOrderMap.put("tableField158",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
businessOrderMap = generaterSwapUtil.swapDataDetail(businessOrderMap,BusinessOrderConstant.getFormData(),"522690032352364805",false);
if (entity.getBusinessType().equals("2")) {
businessOrderMap = generaterSwapUtil.swapDataDetail(businessOrderMap, BusinessOrderConstant.getFormData(), "522690032352364805", false);
}else if(entity.getBusinessType().equals("1")){
businessOrderMap = generaterSwapUtil.swapDataDetail(businessOrderMap, BusinessOrderConstant.getFormData(), "1760188153336909825", false);
}
return ActionResult.success(businessOrderMap);
}
/**
@ -567,20 +571,52 @@ public class BusinessOrderController {
QueryWrapper<BusinessOrderEntity> businessOrderQueryWrapper=new QueryWrapper<>();
businessOrderQueryWrapper.lambda().eq(BusinessOrderEntity::getBusinessType, "2");//销售
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.list(businessOrderQueryWrapper);
List<Map<String, Object>> realList=new ArrayList<>();
// List<Map<String, Object>> realList=new ArrayList<>();
for (BusinessOrderEntity entity: businessOrderEntityList) {
Map<String, Object> businessOrderMap=JsonUtil.entityToMap(entity);
businessOrderMap.put("id", businessOrderMap.get("id"));
//副表数据
//子表数据
List<SettlementInfoEntity> settlementInfoList = businessOrderService.getSettlementInfoList(entity.getId());
businessOrderMap.put("settlementInfoList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(settlementInfoList)));
// businessOrderMap.put("settlementInfoList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(settlementInfoList)));
List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
businessOrderMap.put("businessOrderProductRelationalList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
realList.add(businessOrderMap);
// businessOrderMap.put("businessOrderProductRelationalList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
// realList.add(businessOrderMap);
entity.setSettlementInfoList(settlementInfoList);
entity.setBusinessOrderProductRelationalList(businessOrderProductRelationalList);
}
//数据转换
// realList = generaterSwapUtil.swapDataList(realList, BusinessOrderConstant.getFormData(), BusinessOrderConstant.getColumnData(), "522690032352364805",false);
return ActionResult.success(businessOrderEntityList);
}
/**
*
*
* @return
*/
@Operation(summary = "获取列表")
@GetMapping("/getPurchaseOrderList")
public ActionResult list1()throws IOException{
QueryWrapper<BusinessOrderEntity> businessOrderQueryWrapper=new QueryWrapper<>();
businessOrderQueryWrapper.lambda().eq(BusinessOrderEntity::getBusinessType, "1");//采购
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.list(businessOrderQueryWrapper);
// List<Map<String, Object>> realList=new ArrayList<>();
for (BusinessOrderEntity entity: businessOrderEntityList) {
Map<String, Object> businessOrderMap=JsonUtil.entityToMap(entity);
businessOrderMap.put("id", businessOrderMap.get("id"));
//副表数据
//子表数据
List<SettlementInfoEntity> settlementInfoList = businessOrderService.getSettlementInfoList(entity.getId());
// businessOrderMap.put("settlementInfoList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(settlementInfoList)));
List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
// businessOrderMap.put("businessOrderProductRelationalList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
// realList.add(businessOrderMap);
entity.setSettlementInfoList(settlementInfoList);
entity.setBusinessOrderProductRelationalList(businessOrderProductRelationalList);
}
//数据转换
realList = generaterSwapUtil.swapDataList(realList, BusinessOrderConstant.getFormData(), BusinessOrderConstant.getColumnData(), "522690032352364805",false);
return ActionResult.success(realList);
// realList = generaterSwapUtil.swapDataList(realList, BusinessOrderConstant.getFormData(), BusinessOrderConstant.getColumnData(), "522690032352364805",false);
return ActionResult.success(businessOrderEntityList);
}
}

@ -54,7 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Slf4j
@RestController
@ -309,7 +309,7 @@ public class VoucherController {
tableField111List.add(new ExcelExportEntity("打印时间" ,"printTime"));
break;
case "tableField140-vehicleId":
tableField140List.add(new ExcelExportEntity("车辆id" ,"vehicleId"));
tableField140List.add(new ExcelExportEntity("车牌号" ,"vehicleId"));
break;
case "tableField140-driverName":
tableField140List.add(new ExcelExportEntity("驾驶员名称" ,"driverName"));
@ -506,7 +506,19 @@ public class VoucherController {
voucherMap.put("tableField111",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(voucherProductList)));
List<VoucherVehicleEntity> voucherVehicleList = voucherService.getVoucherVehicleList(entity.getId());
voucherMap.put("tableField140",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(voucherVehicleList)));
voucherMap = generaterSwapUtil.swapDataDetail(voucherMap,VoucherConstant.getFormData(),"523901091608268101",false);
if (entity.getBusinessType().equals("2")) {
if (entity.getDocumentType().equals("1")){
voucherMap = generaterSwapUtil.swapDataDetail(voucherMap, VoucherConstant.getFormData(), "1760139272301498370", false);
}else {
voucherMap = generaterSwapUtil.swapDataDetail(voucherMap, VoucherConstant.getFormData(), "523901091608268101", false);
}
}else if(entity.getBusinessType().equals("1")){
if (entity.getDocumentType().equals("1")) {
voucherMap = generaterSwapUtil.swapDataDetail(voucherMap, VoucherConstant.getFormData(), "1760230311607619586", false);
}else{
voucherMap = generaterSwapUtil.swapDataDetail(voucherMap, VoucherConstant.getFormData(), "1760219164296839170", false);
}
}
return ActionResult.success(voucherMap);
}
/**

@ -438,7 +438,11 @@ public class WarehousingNotificationController {
//子表数据
List<WarehousingProductEntity> warehousingProductList = warehousingNotificationService.getWarehousingProductList(entity.getId());
warehousingNotificationMap.put("tableField121",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(warehousingProductList)));
warehousingNotificationMap = generaterSwapUtil.swapDataDetail(warehousingNotificationMap,WarehousingNotificationConstant.getFormData(),"529305238373400645",false);
if (entity.getWarehousingType().equals("8")){
warehousingNotificationMap = generaterSwapUtil.swapDataDetail(warehousingNotificationMap,WarehousingNotificationConstant.getFormData(),"529305238373400645",false);
}else if(entity.getWarehousingType().equals("1")){
warehousingNotificationMap = generaterSwapUtil.swapDataDetail(warehousingNotificationMap,WarehousingNotificationConstant.getFormData(),"1760244414589886466",false);
}
return ActionResult.success(warehousingNotificationMap);
}
/**

@ -3,6 +3,8 @@ package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
*
*
@ -116,4 +118,9 @@ public class BusinessOrderEntity {
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField(exist = false)
private List<SettlementInfoEntity> settlementInfoList;
@TableField(exist = false)
private List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList;
}

@ -10,7 +10,7 @@ import java.math.BigDecimal;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Data
@TableName("jg_voucher")

@ -13,7 +13,7 @@ import java.math.BigDecimal;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Data
@TableName("jg_voucher_product")
@ -56,4 +56,16 @@ public class VoucherProductEntity {
private Integer deleteMark;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("RECEIPT_UNIT")
private String receiptUnit;
@TableField("CARGO_ID")
private String cargoId;
@TableField("RECEIPT_NUM")
private String receiptNum;
@TableField("BATCH_NO")
private String batchNo;
@TableField("DELIVERY_UNIT")
private String deliveryUnit;
@TableField("DELIVERY_NUM")
private String deliveryNum;
}

@ -9,7 +9,7 @@ import java.util.Date;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Data
@TableName("jg_voucher_vehicle")

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Data
public class VoucherForm {
@ -113,7 +113,8 @@ public class VoucherForm {
/** 关联单据号 **/
@JsonProperty("associatedDocumentNo")
private String associatedDocumentNo;
/** 单据来源 **/
@JsonProperty("voucherSource")
private Object voucherSource;
/** 业务类型 **/
@JsonProperty("businessType")
private Object businessType;
}

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-02-04
* @ 2024-02-21
*/
@Data
public class VoucherPagination extends Pagination {
@ -39,10 +39,10 @@ public class VoucherPagination extends Pagination {
/** 磅单编号 */
@JsonProperty("poundCode")
private Object poundCode;
/** -商品名称 */
@JsonProperty("tableField111_productId")
private Object tableField111_productId;
/** 凭证状态 */
@JsonProperty("voucherStatus")
private Object voucherStatus;
/** 业务类型 */
@JsonProperty("businessType")
private Object businessType;
/** 凭证类型 */
@JsonProperty("documentType")
private Object documentType;
}

@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* V3.5
* : https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
@Data
public class VoucherProductModel {

@ -14,11 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* V3.5
* : https://www.jnpfsoft.com
* JNPF
* 2024-02-04
* 2024-02-21
*/
@Data
public class VoucherVehicleModel {
/** 车辆id **/
/** 车牌号 **/
@JSONField(name = "vehicleId")
private String vehicleId;
/** 驾驶员名称 **/

@ -58,4 +58,8 @@ public class WarehousingProductModel {
/** 备注 **/
@JSONField(name = "remark")
private String remark;
/** 商品名id **/
@JSONField(name = "productId")
private String productId;
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,642 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="凭证编号">
<el-input v-model="query.voucherCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="凭证类型">
<JnpfSelect v-model="query.voucherType" placeholder="请选择" clearable
:options="voucherTypeOptions" :props="voucherTypeProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="制单时间">
<JnpfDateRangePicker v-model="query.preparationTime" format="yyyy-MM-dd"
startPlaceholder="开始日期" endPlaceholder="结束日期">
</JnpfDateRangePicker>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="磅单编号">
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<el-table-column prop="voucherCode" label="凭证编号" align="left">
</el-table-column>
<el-table-column label="单据类型" prop="documentType" algin="left">
<template slot-scope="scope">
{{ scope.row.documentType}}
</template>
</el-table-column>
<el-table-column label="凭证类型" prop="voucherType" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherType}}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus}}
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="left">
</el-table-column>
<el-table-column prop="associatedDocumentNo" label="关联单据号" align="left">
</el-table-column>
<el-table-column prop="vehicleName" label="车牌号" align="left">
</el-table-column>
<el-table-column label="运输方式" prop="modeTransport" algin="left">
<template slot-scope="scope">
{{ scope.row.modeTransport}}
</template>
</el-table-column>
<el-table-column label="承运方式" prop="transportationMethod" algin="left">
<template slot-scope="scope">
{{ scope.row.transportationMethod}}
</template>
</el-table-column>
<el-table-column prop="carrier" label="承运商" align="left">
</el-table-column>
<el-table-column prop="freight" label="运费" align="left">
</el-table-column>
<el-table-column prop="placeDispatch" label="起运地" align="left">
</el-table-column>
<el-table-column prop="destination" label="到达地" align="left">
</el-table-column>
<el-table-column prop="associateThirdSuppliers" label="三级供应商" align="left">
</el-table-column>
<el-table-column prop="preparationTime" label="制单时间" align="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body
:visible.sync="flowListVisible" class="JNPF-dialog template-dialog JNPF-dialog_center"
lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id"
@click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getFormById } from '@/api/workFlow/FormDesign'
import { getFlowList } from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
poundCode: undefined,
businessType: "1",
documentType: "2"
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
voucherTypeOptions: [{ "fullName": "磅单", "id": "1" }, { "fullName": "收据", "id": "2" }, { "fullName": "其他", "id": "3" }],
voucherTypeProps: { "label": "fullName", "value": "id" },
modeTransportOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
modeTransportProps: { "label": "fullName", "value": "id" },
transportationMethodOptions: [{ "fullName": "仓库承运(DC)", "id": "1" }, { "fullName": "承运商", "id": "2" }, { "fullName": "供应商", "id": "3" }, { "fullName": "自提", "id": "4" }],
transportationMethodProps: { "label": "fullName", "value": "id" },
voucherStatusOptions: [{ "fullName": "待提交", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "已驳回", "id": "3" }, { "fullName": "待确认", "id": "4" }, { "fullName": "待收货", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "已取消", "id": "7" }],
voucherStatusProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
documentTypeProps: { "label": "fullName", "value": "id" },
tableField111_productIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
tableField140_vehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
interfaceRes: {
associateThirdSuppliers: [],
tableField111_productId: [],
tableField140_vehicleId: [],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("1760219164296839170").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '1760219164296839170',
type: 1,
};
request({
url: `/api/scm/Voucher/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/Voucher")
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/batchRemove`,
data: ids,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/Voucher/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -0,0 +1,982 @@
<template>
<div :style="{margin: '0 auto',width:'100%'}">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="基本信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('warehousingType')">
<jnpf-form-tip-item label-width="0" prop="warehousingType">
<JnpfRadio v-model="dataForm.warehousingType"
@change="changeData('warehousingType',-1)" :disabled="judgeWrite('warehousingType')"
optionType="button" direction="horizontal" size="small"
:options="warehousingTypeOptions" :props="warehousingTypeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="基础信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('warehousingCode')">
<jnpf-form-tip-item label="通知编号" v-if="judgeShow('warehousingCode')"
prop="warehousingCode">
<JnpfInput v-model="dataForm.warehousingCode"
@change="changeData('warehousingCode',-1)" placeholder="系统自动生成"
:disabled="judgeWrite('warehousingCode')" readonly :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('preparationTime')">
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')"
prop="preparationTime">
<JnpfOpenData v-model="dataForm.preparationTime"
@change="changeData('preparationTime',-1)" placeholder="系统自动生成"
:disabled="judgeWrite('preparationTime')" readonly :style='{"width":"100%"}'
type="currTime">
</JnpfOpenData>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="关联信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('businessId')">
<jnpf-form-tip-item label="采购订单" v-if="judgeShow('businessId')" prop="businessId">
<JnpfPopupSelect v-model="dataForm.businessId" @change="getSaleOrder" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.businessId" placeholder="请选择"
:disabled="judgeWrite('businessId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='code' field='businessId'
interfaceId="529638640356183877" :pageSize="20"
:columnOptions="businessIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.saleOrderInfo" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="销售订单" v-if="judgeShow('warehousingproduct-productName')"
prop="code">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-productName')">*</span>销售订单
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('warehousingproduct-productName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-productName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="订单类型" v-if="judgeShow('warehousingproduct-spec')"
prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-spec')">*</span>订单类型
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousingproduct-spec',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="期望送达时间"
v-if="judgeShow('warehousingproduct-inventoryUnitId')" prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-inventoryUnitId')">*</span>期望送达时间
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('warehousingproduct-inventoryUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-inventoryUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="关联客户(二级)"
v-if="judgeShow('warehousingproduct-purchaseUnitId')" prop="purchaseUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-purchaseUnitId')">*</span>关联客户(二级)
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseUnitId"
@change="changeData('warehousingproduct-purchaseUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-purchaseUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="关联业务线" v-if="judgeShow('warehousingproduct-purchaseNum')"
prop="purchaseNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-purchaseNum')">*</span>关联业务线
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseNum"
@change="changeData('warehousingproduct-purchaseNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-purchaseNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="业务类型" v-if="judgeShow('warehousingproduct-storageAreaId')"
prop="storageAreaId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-storageAreaId')">*</span>业务类型
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.storageAreaId"
@change="changeData('warehousingproduct-storageAreaId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-storageAreaId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="币种" v-if="judgeShow('warehousingproduct-warehousingUnitId')"
prop="warehousingUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-warehousingUnitId')">*</span>币种
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.warehousingUnitId"
@change="changeData('warehousingproduct-warehousingUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-warehousingUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售模式" v-if="judgeShow('warehousingproduct-barCode')"
prop="barCode">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-barCode')">*</span>销售模式
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.barCode"
@change="changeData('warehousingproduct-barCode',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-barCode')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="交货方式"
v-if="judgeShow('warehousingproduct-notificationStorageNumber')"
prop="notificationStorageNumber">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-notificationStorageNumber')">*</span>交货方式
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notificationStorageNumber"
@change="changeData('warehousingproduct-notificationStorageNumber',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-notificationStorageNumber')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="配送方式" v-if="judgeShow('warehousingproduct-volume')"
prop="volume">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-volume')">*</span>配送方式
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.volume"
@change="changeData('warehousingproduct-volume',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-volume')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="运输方式" v-if="judgeShow('warehousingproduct-batchNo')"
prop="batchNo">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-batchNo')">*</span>运输方式
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNo"
@change="changeData('warehousingproduct-batchNo',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-batchNo')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="生产日期" v-if="judgeShow('warehousingproduct-produceDate')"
prop="produceDate">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-produceDate')">*</span>生产日期
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.produceDate"
@change="changeData('warehousingproduct-produceDate',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-produceDate')"
clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('warehousingproduct-remark')"
prop="remark">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-remark')">*</span>备注
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.remark"
@change="changeData('warehousingproduct-remark',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-remark')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column> -->
</el-table>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="收货信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('subjectBasicId')">
<jnpf-form-tip-item label="客户名称" v-if="judgeShow('subjectBasicId')"
prop="subjectBasicId">
<JnpfPopupSelect v-model="dataForm.subjectBasicId"
@change="changeData('subjectBasicId',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.subjectBasicId" placeholder="请选择"
:disabled="judgeWrite('subjectBasicId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='subjectBasicId'
interfaceId="522693551289534725" :pageSize="20"
:columnOptions="subjectBasicIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('shippingAddress')">
<jnpf-form-tip-item label="收货地址" v-if="judgeShow('shippingAddress')"
prop="shippingAddress">
<JnpfInput v-model="dataForm.shippingAddress"
@change="changeData('shippingAddress',-1)" placeholder="请输入"
:disabled="judgeWrite('shippingAddress')" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="发货信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('enterpriseId')">
<jnpf-form-tip-item label="机构名称" v-if="judgeShow('enterpriseId')" prop="enterpriseId">
<JnpfPopupSelect v-model="dataForm.enterpriseId"
@change="changeData('enterpriseId',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.enterpriseId" placeholder="请选择"
:disabled="judgeWrite('enterpriseId')" propsValue="f_id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='f_full_name'
field='enterpriseId' interfaceId="522729853024209157" :pageSize="20"
:columnOptions="enterpriseIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="发货仓库" v-if="judgeShow('warehouseId')" prop="warehouseId">
<JnpfPopupSelect v-model="dataForm.warehouseId" @change="changeData('warehouseId',-1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.warehouseId"
placeholder="请选择" :disabled="judgeWrite('warehouseId')" propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
field='warehouseId' interfaceId="529573170819104773" :pageSize="20"
:columnOptions="warehouseIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryAddress')">
<jnpf-form-tip-item label="发货地址" v-if="judgeShow('deliveryAddress')"
prop="deliveryAddress">
<JnpfPopupSelect v-model="dataForm.deliveryAddress"
@change="changeData('deliveryAddress',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.deliveryAddress" placeholder="请选择"
:disabled="judgeWrite('deliveryAddress')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='addressDetail'
field='deliveryAddress' interfaceId="522724961224231173" :pageSize="20"
:columnOptions="deliveryAddresscolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="其他信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark',-1)"
placeholder="请输入" :disabled="judgeWrite('remark')" :style='{"width":"100%"}' true
type="textarea" :autosize='{"minRows":4,"maxRows":4}'>
</JnpfTextarea>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="商品信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.warehousingProductList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('warehousingproduct-productName')"
prop="productName">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-productName')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productName"
@change="changeData('warehousingproduct-productName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-productName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('warehousingproduct-spec')" prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousingproduct-spec',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('warehousingproduct-inventoryUnitId')"
prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-inventoryUnitId')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('warehousingproduct-inventoryUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-inventoryUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位" v-if="judgeShow('warehousingproduct-purchaseUnitId')"
prop="purchaseUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-purchaseUnitId')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseUnitId"
@change="changeData('warehousingproduct-purchaseUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-purchaseUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售数量" v-if="judgeShow('warehousingproduct-purchaseNum')"
prop="purchaseNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-purchaseNum')">*</span>销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseNum"
@change="changeData('warehousingproduct-purchaseNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-purchaseNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="出库货区" v-if="judgeShow('warehousingproduct-storageAreaId')"
prop="storageAreaId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-storageAreaId')">*</span>出库货区
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.storageAreaId"
@change="changeData('warehousingproduct-storageAreaId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-storageAreaId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="出库单位"
v-if="judgeShow('warehousingproduct-warehousingUnitId')" prop="warehousingUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-warehousingUnitId')">*</span>出库单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.warehousingUnitId"
@change="changeData('warehousingproduct-warehousingUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-warehousingUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="包装条码" v-if="judgeShow('warehousingproduct-barCode')"
prop="barCode">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-barCode')">*</span>包装条码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.barCode"
@change="changeData('warehousingproduct-barCode',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-barCode')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="通知出库数量"
v-if="judgeShow('warehousingproduct-notificationStorageNumber')"
prop="notificationStorageNumber">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-notificationStorageNumber')">*</span>通知出库数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notificationStorageNumber"
@change="changeData('warehousingproduct-notificationStorageNumber',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-notificationStorageNumber')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="体积" v-if="judgeShow('warehousingproduct-volume')"
prop="volume">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-volume')">*</span>体积
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.volume"
@change="changeData('warehousingproduct-volume',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-volume')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="批次号" v-if="judgeShow('warehousingproduct-batchNo')"
prop="batchNo">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-batchNo')">*</span>批次号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNo"
@change="changeData('warehousingproduct-batchNo',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-batchNo')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="生产日期" v-if="judgeShow('warehousingproduct-produceDate')"
prop="produceDate">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-produceDate')">*</span>生产日期
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.produceDate"
@change="changeData('warehousingproduct-produceDate',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-produceDate')"
clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('warehousingproduct-remark')"
prop="remark">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-remark')">*</span>备注
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.remark"
@change="changeData('warehousingproduct-remark',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingproductList')||judgeWrite('warehousingproductList-remark')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50" v-if="!judgeWrite('warehousingproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delwarehousingproductList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addwarehousingproductList()"
v-if="!judgeWrite('warehousingproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getFormById } from '@/api/workFlow/FormDesign'
import comMixin from '@/views/workFlow/workFlowForm/mixin';
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
mixins: [comMixin],
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
warehousingProductList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
warehousingProductList: {
productName: '',
productNameOptions: [],
spec: '',
specOptions: [],
inventoryUnitId: '',
inventoryUnitIdOptions: [],
purchaseUnitId: '',
purchaseUnitIdOptions: [],
purchaseNum: '',
purchaseNumOptions: [],
storageAreaId: '',
storageAreaIdOptions: [],
warehousingUnitId: '',
warehousingUnitIdOptions: [],
barCode: '',
barCodeOptions: [],
notificationStorageNumber: '',
notificationStorageNumberOptions: [],
volume: '',
volumeOptions: [],
batchNo: '',
batchNoOptions: [],
produceDate: '',
produceDateOptions: [],
remark: '',
remarkOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
warehousingType: "1",
warehousingCode: undefined,
preparationTime: undefined,
businessId: undefined,
subjectBasicId: undefined,
shippingAddress: undefined,
enterpriseId: undefined,
warehouseId: undefined,
deliveryAddress: undefined,
remark: undefined,
warehousingProductList: [],
saleOrderInfo: [],
version: 0,
},
tableRequiredData: {},
dataRule:
{
},
warehousingTypeOptions: [{ "fullName": "采购入库", "id": "1" }],
warehousingTypeProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "订单编号", "value": "code" },],
subjectBasicIdcolumnOptions: [{ "label": "名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "地址详情", "value": "addressDetail" },],
childIndex: -1,
isEdit: false,
interfaceRes: {
warehousingType: [],
warehousingCode: [],
preparationTime: [],
businessId: [],
subjectBasicId: [],
shippingAddress: [],
enterpriseId: [],
warehouseId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessLineId", "fieldName": "", "id": "PneOdw1", "jnpfKey": null, "relationField": null, "required": "0" }],
deliveryAddress: [{ "dataType": "varchar", "defaultValue": "", "field": "businessOrganizeId", "fieldName": "", "id": "AyAmdw1", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }],
remark: [],
warehousingproductproductName: [],
warehousingproductspec: [],
warehousingproductinventoryUnitId: [],
warehousingproductpurchaseUnitId: [],
warehousingproductpurchaseNum: [],
warehousingproductstorageAreaId: [],
warehousingproductwarehousingUnitId: [],
warehousingproductbarCode: [],
warehousingproductnotificationStorageNumber: [],
warehousingproductvolume: [],
warehousingproductbatchNo: [],
warehousingproductproduceDate: [],
warehousingproductremark: [],
},
}
},
computed: {
formOperates() {
return this.setting.formOperates
}
},
watch: {},
created() {
this.getFormById()
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) {
this.initDefaultData()
}
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
getSaleOrder(val, val2) {
debugger
this.dataForm.saleOrderInfo[0] = val2
this.dataForm.subjectBasicId = val2.firstSubjectBasicId
this.dataForm.shippingAddress = val2.receiveAddress
this.dataForm.enterpriseId = val2.enterpriseId
this.dataForm.warehouseId = val2.deliveryWarehouse
this.dataForm.deliveryAddress = val2.deliveryAddress
val2.businessOrderProductRelationalList.forEach((item, index) => {
item.productName = item.name
item.purchaseUnitId = item.salesMainUnitId
item.purchaseNum = item.businessNum
})
this.dataForm.warehousingProductList = val2.businessOrderProductRelationalList
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
selfGetInfo(dataForm) {
this.dataInfo(dataForm)
},
beforeSubmit() {
const _data = this.dataList()
return _data
},
selfInit() {
this.dataAll()
},
getFormById() {
getFormById("529305238373400645").then(res => {
this.dataForm.flowId = res.data && res.data.flowId
// this.encode = res.data&&res.data.encode
})
},
exist() {
let isOk = true
for (let key in this.tableRequiredData) {
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
for (let i = 0; i < this.dataForm[key].length; i++) {
let item = this.dataForm[key][i]
inner: for (let id in item) {
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
if (!arr.length) continue inner
if (arr[0].required) {
let msg = `${arr[0].name}不能为空`
let boo = true
if (arr[0].dataType === 'array') {
boo = !this.jnpf.isEmptyArray(item[id])
} else {
boo = !this.jnpf.isEmpty(item[id])
}
if (!boo) {
this.$message({
message: msg,
type: 'error',
duration: 1000
})
isOk = false
break
}
}
}
}
}
}
if (!this.warehousingproductExist()) return
return isOk
},
warehousingproductExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.warehousingProductList.length; i++) {
const e = this.dataForm.warehousingProductList[i];
}
return isOk;
},
goBack() {
this.$emit('refresh')
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
//
initDefaultData() {
},
addwarehousingproductList() {
let item = {
productName: undefined,
spec: undefined,
inventoryUnitId: undefined,
purchaseUnitId: undefined,
purchaseNum: undefined,
storageAreaId: undefined,
warehousingUnitId: undefined,
barCode: undefined,
notificationStorageNumber: undefined,
volume: undefined,
batchNo: undefined,
produceDate: undefined,
remark: undefined,
}
this.getwarehousingproductList(item)
},
delwarehousingproductList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.warehousingProductList.splice(index, 1);
}).catch(() => {
});
},
getwarehousingproductList(value) {
let item = { ...this.tableRows.warehousingProductList, ...value }
this.dataForm.warehousingProductList.push(item)
this.childIndex = this.dataForm.warehousingProductList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.warehousingProductList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

@ -0,0 +1,562 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="通知编号">
<el-input v-model="query.warehousingCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<el-table-column prop="warehousingCode" label="通知编号" align="left">
</el-table-column>
<el-table-column prop="businessId" label="销售订单" align="left">
</el-table-column>
<el-table-column prop="subjectBasicId" label="客户名称" align="left">
</el-table-column>
<el-table-column prop="shippingAddress" label="收货地址" align="left">
</el-table-column>
<el-table-column prop="enterpriseId" label="机构名称" align="left">
</el-table-column>
<el-table-column prop="warehouseId" label="发货仓库" align="left">
</el-table-column>
<el-table-column prop="deliveryAddress" label="发货地址" align="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body
:visible.sync="flowListVisible" class="JNPF-dialog template-dialog JNPF-dialog_center"
lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id"
@click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getFormById } from '@/api/workFlow/FormDesign'
import { getFlowList } from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
warehousingCode: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
warehousingTypeOptions: [{ "fullName": "销售出库", "id": "8" }],
warehousingTypeProps: { "label": "fullName", "value": "id" },
interfaceRes: {
businessId: [],
subjectBasicId: [],
enterpriseId: [],
warehouseId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessLineId", "fieldName": "", "id": "PneOdw1", "jnpfKey": null, "relationField": null, "required": "0" }],
deliveryAddress: [{ "dataType": "varchar", "defaultValue": "", "field": "businessOrganizeId", "fieldName": "", "id": "AyAmdw1", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("1760244414589886466").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '1760244414589886466',
type: 1,
};
request({
url: `/api/scm/WarehousingNotification/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/WarehousingNotification/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/WarehousingNotification")
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/WarehousingNotification/batchRemove`,
data: ids,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/WarehousingNotification/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

@ -0,0 +1,847 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="'库存检查'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<template v-if="dataForm.id">
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
{{'上一条'}}
</el-dropdown-item>
<el-dropdown-item @click.native="next" :disabled='nextDis'>
{{'下一条'}}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'> </el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="基础信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="发货仓库" prop="deliveryWarehouse">
<JnpfInput v-model="dataForm.deliveryWarehouse"
@change="changeData('deliveryWarehouse',-1)" placeholder="请输入" readonly clearable
:style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="选择订单数量" prop="orderNum">
<JnpfInput v-model="dataForm.orderNum" @change="changeData('orderNum',-1)"
placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="订单信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="单据编号" prop="code">
<template slot="header" v-if="false">
<span class="required-sign">*</span>单据编号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('businessordervoucherrelational-orderId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="客户名称" prop="firstSubjectBasicId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>客户名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.firstSubjectBasicId"
@change="changeData('businessordervoucherrelational-voucherId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="发货仓库" prop="deliveryWarehouse">
<template slot="header" v-if="false">
<span class="required-sign">*</span>发货仓库
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.deliveryWarehouse"
@change="changeData('businessordervoucherrelational-orderType',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="紧急程度" prop="urgentOrder">
<template slot="header" v-if="false">
<span class="required-sign">*</span>紧急程度
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.urgentOrder"
@change="changeData('businessordervoucherrelational-cargoAreaId',scope.$index)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="businessordervoucherrelationalcargoAreaIdOptions"
:props="businessordervoucherrelationalcargoAreaIdProps" readonly>
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="订货时间" prop="creatorTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>订货时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.creatorTime"
@change="changeData('businessordervoucherrelational-creatorTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd" readonly>
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="期望发货时间" prop="lastModifyTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>期望发货时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.lastModifyTime"
@change="changeData('businessordervoucherrelational-lastModifyTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd" readonly>
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="期望送达时间" prop="deleteTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>期望送达时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.deleteTime"
@change="changeData('businessordervoucherrelational-deleteTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd" readonly>
</JnpfDatePicker>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessordervoucherrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addbusinessordervoucherrelationalList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="商品信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessorderproductrelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" prop="productId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productId"
@change="changeData('businessorderproductrelational-productId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="仓库名称" prop="businessOrderId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>仓库名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessOrderId"
@change="changeData('businessorderproductrelational-businessOrderId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" prop="spec">
<template slot="header" v-if="false">
<span class="required-sign">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" prop="unitId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.unitId"
@change="changeData('businessorderproductrelational-unitId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位" prop="salesMainUnitId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.salesMainUnitId"
@change="changeData('businessorderproductrelational-salesMainUnitId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存" prop="realBound">
<template slot="header" v-if="false">
<span class="required-sign">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.realBound"
@change="changeData('businessorderproductrelational-realBound',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="可用库存" prop="useBound">
<template slot="header" v-if="false">
<span class="required-sign">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound"
@change="changeData('businessorderproductrelational-useBound',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="在途库存" prop="creatorTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>在途库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.creatorTime"
@change="changeData('businessorderproductrelational-creatorTime',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他仓库库存" prop="creatorUserId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>其他仓库库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.creatorUserId"
@change="changeData('businessorderproductrelational-creatorUserId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单价" prop="businessPrice">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessPrice"
@change="changeData('businessorderproductrelational-businessPrice',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售数量" prop="businessNum">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessNum"
@change="changeData('businessorderproductrelational-businessNum',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="检查结果" prop="lastModifyUserId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>检查结果
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.lastModifyUserId"
@change="changeData('businessorderproductrelational-lastModifyUserId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addbusinessorderproductrelationalList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
businessOrderList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
businessorderproductrelationalList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
businessOrderList: {
orderId: '',
orderIdOptions: [],
voucherId: '',
voucherIdOptions: [],
orderType: '',
orderTypeOptions: [],
cargoAreaIdOptions: [],
creatorTime: '',
creatorTimeOptions: [],
lastModifyTime: '',
lastModifyTimeOptions: [],
deleteTime: '',
deleteTimeOptions: [],
enabledmark: undefined
},
businessorderproductrelationalList: {
productId: '',
productIdOptions: [],
businessOrderId: '',
businessOrderIdOptions: [],
spec: '',
specOptions: [],
unitId: '',
unitIdOptions: [],
salesMainUnitId: '',
salesMainUnitIdOptions: [],
realBound: '',
realBoundOptions: [],
useBound: '',
useBoundOptions: [],
creatorTime: '',
creatorTimeOptions: [],
creatorUserId: '',
creatorUserIdOptions: [],
businessPrice: '',
businessPriceOptions: [],
businessNum: '',
businessNumOptions: [],
lastModifyUserId: '',
lastModifyUserIdOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
deliveryWarehouse: undefined,
orderNum: undefined,
businessOrderList: [],
businessorderproductrelationalList: [],
},
tableRequiredData: {},
dataRule:
{
},
businessordervoucherrelationalcargoAreaIdOptions: [{ "fullName": "普通订单", "id": "1" }, { "fullName": "紧急订单", "id": "2" }],
businessordervoucherrelationalcargoAreaIdProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
deliveryWarehouse: [],
orderNum: [],
businessordervoucherrelationalorderId: [],
businessordervoucherrelationalvoucherId: [],
businessordervoucherrelationalorderType: [],
businessordervoucherrelationalcargoAreaId: [],
businessordervoucherrelationalcreatorTime: [],
businessordervoucherrelationallastModifyTime: [],
businessordervoucherrelationaldeleteTime: [],
businessorderproductrelationalproductId: [],
businessorderproductrelationalbusinessOrderId: [],
businessorderproductrelationalspec: [],
businessorderproductrelationalunitId: [],
businessorderproductrelationalsalesMainUnitId: [],
businessorderproductrelationalrealBound: [],
businessorderproductrelationaluseBound: [],
businessorderproductrelationalcreatorTime: [],
businessorderproductrelationalcreatorUserId: [],
businessorderproductrelationalbusinessPrice: [],
businessorderproductrelationalbusinessNum: [],
businessorderproductrelationallastModifyUserId: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
prev() {
this.index--
if (this.index === 0) {
this.prevDis = true
}
this.nextDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
next() {
this.index++
if (this.index === this.allList.length - 1) {
this.nextDis = true
}
this.prevDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
getInfo(id) {
request({
url: '/api/scm/BusinessOrder/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
},
goBack() {
debugger
this.visible = false
this.$router.go(-1)
// this.$emit('refreshDataList', true)
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
businessordervoucherrelationalExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.businessOrderList.length; i++) {
const e = this.dataForm.businessOrderList[i];
}
return isOk;
},
businessorderproductrelationalExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.businessorderproductrelationalList.length; i++) {
const e = this.dataForm.businessorderproductrelationalList[i];
}
return isOk;
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(data) {
this.dataForm.deliveryWarehouse = data[0].deliveryWarehouse;
this.dataForm.orderNum = data.length
let list = []
data.forEach((item, index) => {
debugger
console.log("2", item.businessOrderProductRelationalList);
this.dataForm.businessOrderList.push(item)
this.dataForm.businessorderproductrelationalList = [...item.businessOrderProductRelationalList, ...this.dataForm.businessorderproductrelationalList]
});
console.log("1", this.dataForm.businessorderproductrelationalList);
// this.businessOrderList = data
// this.prevDis = false
// this.nextDis = false
// this.allList = allList || []
// if (allList.length) {
// this.index = this.allList.findIndex(item => item.id === id)
// if (this.index == 0) {
// this.prevDis = true
// }
// if (this.index == this.allList.length - 1) {
// this.nextDis = true
// }
// } else {
// this.prevDis = true
// this.nextDis = true
// }
// this.dataForm.id = id || 0;
// this.visible = true;
// this.$nextTick(() => {
// if (this.dataForm.id) {
// this.loading = true
// request({
// url: '/api/scm/BusinessOrder/' + this.dataForm.id,
// method: 'get'
// }).then(res => {
// this.dataInfo(res.data)
// this.loading = false
// });
// } else {
// this.clearData()
// this.initDefaultData()
// }
// });
// this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
if (!this.businessordervoucherrelationalExist()) return
if (!this.businessorderproductrelationalExist()) return
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
this.btnLoading = true
}
if (!this.dataForm.id) {
request({
url: '/api/scm/BusinessOrder',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
} else {
request({
url: '/api/scm/BusinessOrder/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}
},
addbusinessordervoucherrelationalList() {
let item = {
code: undefined,
code: undefined,
deliveryWarehouse: undefined,
urgentOrder: '',
creatorTime: undefined,
lastModifyTime: undefined,
deleteTime: undefined,
}
this.getbusinessordervoucherrelationalList(item)
},
delbusinessordervoucherrelationalList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.businessOrderList.splice(index, 1);
}).catch(() => {
});
},
getbusinessordervoucherrelationalList(value) {
let item = { ...this.tableRows.businessOrderList, ...value }
this.dataForm.businessOrderList.push(item)
this.childIndex = this.dataForm.businessOrderList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
addbusinessorderproductrelationalList() {
let item = {
productId: undefined,
businessOrderId: undefined,
spec: undefined,
unitId: undefined,
salesMainUnitId: undefined,
realBound: undefined,
useBound: undefined,
creatorTime: undefined,
creatorUserId: undefined,
businessPrice: undefined,
businessNum: undefined,
lastModifyUserId: undefined,
}
this.getbusinessorderproductrelationalList(item)
},
delbusinessorderproductrelationalList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.businessorderproductrelationalList.splice(index, 1);
}).catch(() => {
});
},
getbusinessorderproductrelationalList(value) {
let item = { ...this.tableRows.businessorderproductrelationalList, ...value }
this.dataForm.businessorderproductrelationalList.push(item)
this.childIndex = this.dataForm.businessorderproductrelationalList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.inits()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.businessOrderList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.businessorderproductrelationalList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

@ -0,0 +1,858 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="'库存锁定'" />
<div class="options">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<template v-if="dataForm.id">
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
{{'上一条'}}
</el-dropdown-item>
<el-dropdown-item @click.native="next" :disabled='nextDis'>
{{'下一条'}}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<!-- <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'> </el-button> -->
<el-button type="primary" @click="createRedeliveryOrder()" :loading="btnLoading"
:disabled='continueBtnLoading'> 生成补送单 </el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="基础信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="发货仓库" prop="deliveryWarehouse">
<JnpfInput v-model="dataForm.deliveryWarehouse"
@change="changeData('deliveryWarehouse',-1)" placeholder="请输入" disabled clearable
:style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="选择订单数量" prop="orderNum">
<JnpfInput v-model="dataForm.orderNum" @change="changeData('orderNum',-1)"
placeholder="请输入" disabled clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="订单信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="单据编号" prop="code">
<template slot="header" v-if="false">
<span class="required-sign">*</span>单据编号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('businessordervoucherrelational-orderId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="客户名称" prop="code">
<template slot="header" v-if="false">
<span class="required-sign">*</span>客户名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('businessordervoucherrelational-voucherId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="发货仓库" prop="deliveryWarehouse">
<template slot="header" v-if="false">
<span class="required-sign">*</span>发货仓库
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.deliveryWarehouse"
@change="changeData('businessordervoucherrelational-orderType',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="紧急程度" prop="urgentOrder">
<template slot="header" v-if="false">
<span class="required-sign">*</span>紧急程度
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.urgentOrder"
@change="changeData('businessordervoucherrelational-cargoAreaId',scope.$index)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="businessordervoucherrelationalcargoAreaIdOptions"
:props="businessordervoucherrelationalcargoAreaIdProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="订货时间" prop="creatorTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>订货时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.creatorTime"
@change="changeData('businessordervoucherrelational-creatorTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="期望发货时间" prop="lastModifyTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>期望发货时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.lastModifyTime"
@change="changeData('businessordervoucherrelational-lastModifyTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="期望送达时间" prop="deleteTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>期望送达时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.deleteTime"
@change="changeData('businessordervoucherrelational-deleteTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessordervoucherrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addbusinessordervoucherrelationalList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="商品信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessorderproductrelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" prop="productId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productId"
@change="changeData('businessorderproductrelational-productId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="仓库名称" prop="businessOrderId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>仓库名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessOrderId"
@change="changeData('businessorderproductrelational-businessOrderId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" prop="spec">
<template slot="header" v-if="false">
<span class="required-sign">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" prop="unitId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.unitId"
@change="changeData('businessorderproductrelational-unitId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位" prop="salesMainUnitId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.salesMainUnitId"
@change="changeData('businessorderproductrelational-salesMainUnitId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存" prop="realBound">
<template slot="header" v-if="false">
<span class="required-sign">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.realBound"
@change="changeData('businessorderproductrelational-realBound',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="可用库存" prop="useBound">
<template slot="header" v-if="false">
<span class="required-sign">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound"
@change="changeData('businessorderproductrelational-useBound',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="在途库存" prop="creatorTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>在途库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.creatorTime"
@change="changeData('businessorderproductrelational-creatorTime',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他仓库库存" prop="creatorUserId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>其他仓库库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.creatorUserId"
@change="changeData('businessorderproductrelational-creatorUserId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单价" prop="businessPrice">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessPrice"
@change="changeData('businessorderproductrelational-businessPrice',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售数量" prop="businessNum">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessNum"
@change="changeData('businessorderproductrelational-businessNum',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="检查结果" prop="lastModifyUserId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>检查结果
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.lastModifyUserId"
@change="changeData('businessorderproductrelational-lastModifyUserId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addbusinessorderproductrelationalList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
<RedeliveryOrder v-if="redeliveryOrderVisible" ref="RedeliveryOrder" />
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
import RedeliveryOrder from './redeliveryOrder.vue'
export default {
components: { RedeliveryOrder },
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
redeliveryOrderVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
businessOrderList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
businessorderproductrelationalList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
businessOrderList: {
orderId: '',
orderIdOptions: [],
voucherId: '',
voucherIdOptions: [],
orderType: '',
orderTypeOptions: [],
cargoAreaIdOptions: [],
creatorTime: '',
creatorTimeOptions: [],
lastModifyTime: '',
lastModifyTimeOptions: [],
deleteTime: '',
deleteTimeOptions: [],
enabledmark: undefined
},
businessorderproductrelationalList: {
productId: '',
productIdOptions: [],
businessOrderId: '',
businessOrderIdOptions: [],
spec: '',
specOptions: [],
unitId: '',
unitIdOptions: [],
salesMainUnitId: '',
salesMainUnitIdOptions: [],
realBound: '',
realBoundOptions: [],
useBound: '',
useBoundOptions: [],
creatorTime: '',
creatorTimeOptions: [],
creatorUserId: '',
creatorUserIdOptions: [],
businessPrice: '',
businessPriceOptions: [],
businessNum: '',
businessNumOptions: [],
lastModifyUserId: '',
lastModifyUserIdOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
deliveryWarehouse: undefined,
orderNum: undefined,
businessOrderList: [],
businessorderproductrelationalList: [],
},
tableRequiredData: {},
dataRule:
{
},
businessordervoucherrelationalcargoAreaIdOptions: [{ "fullName": "普通订单", "id": "1" }, { "fullName": "紧急订单", "id": "2" }],
businessordervoucherrelationalcargoAreaIdProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
deliveryWarehouse: [],
orderNum: [],
businessordervoucherrelationalorderId: [],
businessordervoucherrelationalvoucherId: [],
businessordervoucherrelationalorderType: [],
businessordervoucherrelationalcargoAreaId: [],
businessordervoucherrelationalcreatorTime: [],
businessordervoucherrelationallastModifyTime: [],
businessordervoucherrelationaldeleteTime: [],
businessorderproductrelationalproductId: [],
businessorderproductrelationalbusinessOrderId: [],
businessorderproductrelationalspec: [],
businessorderproductrelationalunitId: [],
businessorderproductrelationalsalesMainUnitId: [],
businessorderproductrelationalrealBound: [],
businessorderproductrelationaluseBound: [],
businessorderproductrelationalcreatorTime: [],
businessorderproductrelationalcreatorUserId: [],
businessorderproductrelationalbusinessPrice: [],
businessorderproductrelationalbusinessNum: [],
businessorderproductrelationallastModifyUserId: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
createRedeliveryOrder() {
this.redeliveryOrderVisible = true
this.$nextTick(() => {
this.$refs.RedeliveryOrder.init(this.dataForm)
})
},
prev() {
this.index--
if (this.index === 0) {
this.prevDis = true
}
this.nextDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
next() {
this.index++
if (this.index === this.allList.length - 1) {
this.nextDis = true
}
this.prevDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
getInfo(id) {
request({
url: '/api/scm/BusinessOrder/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
},
goBack() {
debugger
this.visible = false
this.$router.go(-1)
// this.$emit('refreshDataList', true)
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
businessordervoucherrelationalExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.businessOrderList.length; i++) {
const e = this.dataForm.businessOrderList[i];
}
return isOk;
},
businessorderproductrelationalExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.businessorderproductrelationalList.length; i++) {
const e = this.dataForm.businessorderproductrelationalList[i];
}
return isOk;
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(data) {
this.dataForm.deliveryWarehouse = data[0].deliveryWarehouse;
this.dataForm.orderNum = data.length
let list = []
data.forEach((item, index) => {
debugger
console.log("2", item.businessOrderProductRelationalList);
this.dataForm.businessOrderList.push(item)
this.dataForm.businessorderproductrelationalList = [...item.businessOrderProductRelationalList, ...this.dataForm.businessorderproductrelationalList]
});
console.log("1", this.dataForm.businessorderproductrelationalList);
// this.businessOrderList = data
// this.prevDis = false
// this.nextDis = false
// this.allList = allList || []
// if (allList.length) {
// this.index = this.allList.findIndex(item => item.id === id)
// if (this.index == 0) {
// this.prevDis = true
// }
// if (this.index == this.allList.length - 1) {
// this.nextDis = true
// }
// } else {
// this.prevDis = true
// this.nextDis = true
// }
// this.dataForm.id = id || 0;
// this.visible = true;
// this.$nextTick(() => {
// if (this.dataForm.id) {
// this.loading = true
// request({
// url: '/api/scm/BusinessOrder/' + this.dataForm.id,
// method: 'get'
// }).then(res => {
// this.dataInfo(res.data)
// this.loading = false
// });
// } else {
// this.clearData()
// this.initDefaultData()
// }
// });
// this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
if (!this.businessordervoucherrelationalExist()) return
if (!this.businessorderproductrelationalExist()) return
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
this.btnLoading = true
}
if (!this.dataForm.id) {
request({
url: '/api/scm/BusinessOrder',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
} else {
request({
url: '/api/scm/BusinessOrder/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}
},
addbusinessordervoucherrelationalList() {
let item = {
code: undefined,
code: undefined,
deliveryWarehouse: undefined,
urgentOrder: '',
creatorTime: undefined,
lastModifyTime: undefined,
deleteTime: undefined,
}
this.getbusinessordervoucherrelationalList(item)
},
delbusinessordervoucherrelationalList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.businessOrderList.splice(index, 1);
}).catch(() => {
});
},
getbusinessordervoucherrelationalList(value) {
let item = { ...this.tableRows.businessOrderList, ...value }
this.dataForm.businessOrderList.push(item)
this.childIndex = this.dataForm.businessOrderList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
addbusinessorderproductrelationalList() {
let item = {
productId: undefined,
businessOrderId: undefined,
spec: undefined,
unitId: undefined,
salesMainUnitId: undefined,
realBound: undefined,
useBound: undefined,
creatorTime: undefined,
creatorUserId: undefined,
businessPrice: undefined,
businessNum: undefined,
lastModifyUserId: undefined,
}
this.getbusinessorderproductrelationalList(item)
},
delbusinessorderproductrelationalList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.businessorderproductrelationalList.splice(index, 1);
}).catch(() => {
});
},
getbusinessorderproductrelationalList(value) {
let item = { ...this.tableRows.businessorderproductrelationalList, ...value }
this.dataForm.businessorderproductrelationalList.push(item)
this.childIndex = this.dataForm.businessorderproductrelationalList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.businessOrderList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.businessorderproductrelationalList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

File diff suppressed because one or more lines are too long

@ -0,0 +1,707 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="单据类型">
<JnpfSelect v-model="query.orderType" placeholder="请选择" clearable
:options="orderTypeOptions" :props="orderTypeProps">
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单据编号">
<el-input v-model="query.code" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否紧急">
<JnpfSelect v-model="query.urgentOrder" placeholder="请选择" clearable
:options="urgentOrderOptions" :props="urgentOrderProps">
</JnpfSelect>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="制单时间">
<JnpfDateRangePicker v-model="query.createOrderDate" format="yyyy-MM-dd"
startPlaceholder="开始日期" endPlaceholder="结束日期" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配送方式">
<JnpfSelect v-model="query.deliveryType" placeholder="请选择" clearable
:options="deliveryTypeOptions" :props="deliveryTypeProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态">
<JnpfSelect v-model="query.status" placeholder="请选择" clearable
:options="statusOptions" :props="statusProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="boundCheck()">库存检查
</el-button>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="boundLock()">库存锁定
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<el-table-column prop="code" label="单据编号" align="left">
</el-table-column>
<el-table-column prop="firstSubjectBasicId" label="一级供应商" align="left">
</el-table-column>
<el-table-column label="单据类型" prop="orderType" algin="left">
<template slot-scope="scope">
{{ scope.row.orderType}}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" algin="left">
<template slot-scope="scope">
{{ scope.row.status}}
</template>
</el-table-column>
<el-table-column prop="correlatedOrderId" label="关联采购" align="left">
</el-table-column>
<el-table-column label="是否紧急" prop="urgentOrder" algin="left">
<template slot-scope="scope">
{{ scope.row.urgentOrder}}
</template>
</el-table-column>
<el-table-column prop="deliveryWarehouse" label="发货仓库" align="left">
</el-table-column>
<el-table-column prop="expectArriveDateStart" label="期望送达" align="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body
:visible.sync="flowListVisible" class="JNPF-dialog template-dialog JNPF-dialog_center"
lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id"
@click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
<BoundCheck v-if="boundCheckVisible" ref="BoundCheck" @refresh="initData" />
<BoundLock v-if="boundLockVisible" ref="BoundLock" @refresh="initData" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getFormById } from '@/api/workFlow/FormDesign'
import { getFlowList } from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
import BoundCheck from './boundCheck.vue'
import BoundLock from './boundLock.vue'
export default {
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery, BoundCheck, BoundLock,
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
boundCheckVisible: false,
boundLockVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
orderType: undefined,
code: undefined,
urgentOrder: undefined,
createOrderDate: undefined,
deliveryType: undefined,
status: undefined,
businessType: "1"
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
multipleSelection: [],
multipleSelectionItem: [],
total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
orderTypeOptions: [{ "fullName": "标准销售", "id": "1" }, { "fullName": "合同销售", "id": "2" }],
orderTypeProps: { "label": "fullName", "value": "id" },
urgentOrderOptions: [{ "fullName": "否", "id": "1" }, { "fullName": "是", "id": "2" }],
urgentOrderProps: { "label": "fullName", "value": "id" },
deliveryTypeOptions: [{ "fullName": "无", "id": "1" }, { "fullName": "仓配", "id": "2" }, { "fullName": "直达", "id": "3" }],
deliveryTypeProps: { "label": "fullName", "value": "id" },
currencyOptions: [{ "fullName": "人民币", "id": "1" }, { "fullName": "港元", "id": "2" }, { "fullName": "美元", "id": "3" }, { "fullName": "欧元", "id": "4" }, { "fullName": "加币", "id": "5" }, { "fullName": "日元", "id": "6" }, { "fullName": "台币", "id": "7" }],
currencyProps: { "label": "fullName", "value": "id" },
saleModeOptions: [{ "fullName": "以销定采", "id": "1" }, { "fullName": "以采定销", "id": "2" }],
saleModeProps: { "label": "fullName", "value": "id" },
fixPriceModeOptions: [{ "fullName": "锁价模式", "id": "1" }, { "fullName": "后结算模式", "id": "2" }],
fixPriceModeProps: { "label": "fullName", "value": "id" },
transactionModeOptions: [{ "fullName": "快递交货", "id": "1" }, { "fullName": "送货上门", "id": "2" }, { "fullName": "上门提货", "id": "3" }],
transactionModeProps: { "label": "fullName", "value": "id" },
transportModeOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
transportModeProps: { "label": "fullName", "value": "id" },
statusOptions: [{ "fullName": "待校验", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "待处理", "id": "3" }, { "fullName": "待执行", "id": "4" }, { "fullName": "执行中", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "校验失败", "id": "7" }, { "fullName": "已取消", "id": "8" }],
statusProps: { "label": "fullName", "value": "id" },
tableField135_paymentMethodOptions: [],
tableField135_paymentMethodProps: { "label": "fullName", "value": "enCode" },
tableField135_collaborationMethodOptions: [],
tableField135_collaborationMethodProps: { "label": "fullName", "value": "enCode" },
tableField135_settlementMethodOptions: [],
tableField135_settlementMethodProps: { "label": "fullName", "value": "enCode" },
tableField135_underpaymentMethodOptions: [{ "fullName": "无", "id": "1" }, { "fullName": "按金额", "id": "2" }, { "fullName": "按比例", "id": "3" }],
tableField135_underpaymentMethodProps: { "label": "fullName", "value": "id" },
tableField135_marginMethodOptions: [{ "fullName": "无", "id": "1" }, { "fullName": "按金额", "id": "2" }, { "fullName": "按比例", "id": "3" }],
tableField135_marginMethodProps: { "label": "fullName", "value": "id" },
tableField135_overdueInterestRateOptions: [{ "fullName": "按年化", "id": "1" }, { "fullName": "按月化", "id": "fCgxew1" }],
tableField135_overdueInterestRateProps: { "label": "fullName", "value": "id" },
tableField158_productIdcolumnOptions: [{ "label": "商品编码", "value": "commodity_code" }, { "label": "商品名称", "value": "commodity_name" }, { "label": "商品规格", "value": "specifications" },],
tableField158_salesMainUnitIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
tableField158_salesMainUnitIdProps: { "label": "fullName", "value": "id" },
interfaceRes: {
businessLineId: [],
contractId: [],
correlatedOrderId: [],
secondSubjectBasicId: [],
firstSubjectBasicId: [],
enterpriseId: [],
deliveryWarehouse: [{ "dataType": "varchar", "defaultValue": "", "field": "businessLineId", "fieldName": "", "id": "PneOdw1", "jnpfKey": "popupSelect", "relationField": "businessLineId", "required": "0" }],
deliveryAddress: [{ "dataType": "varchar", "defaultValue": "", "field": "businessOrganizeId", "fieldName": "", "id": "AyAmdw1", "jnpfKey": "popupSelect", "relationField": "deliveryWarehouse", "required": "0" }],
tableField158_productId: [{ "fieldName": "", "field": "contractId", "defaultValue": "", "jnpfKey": "popupSelect", "dataType": "varchar", "id": "spNokw1", "relationField": "contractId", "required": "0" }],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("1760188153336909825").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '1760188153336909825',
type: 1,
};
request({
url: `/api/scm/BusinessOrder/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/BusinessOrder/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/BusinessOrder")
})
},
handleSelectionChange(val) {
this.multipleSelectionItem = val
const res = val.map(item => item.id)
this.multipleSelection = res
},
boundCheck() {
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const data = this.multipleSelectionItem
debugger
this.boundCheckVisible = true
this.$nextTick(() => {
this.$refs.BoundCheck.init(data)
})
},
boundLock() {
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const data = this.multipleSelectionItem
this.boundLockVisible = true
this.$nextTick(() => {
this.$refs.BoundLock.init(data)
})
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/BusinessOrder/batchRemove`,
data: ids,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/BusinessOrder/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

@ -0,0 +1,835 @@
<template>
<div :style="{margin: '0 auto',width:'100%'}">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="基础信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('redeliveryOrderCode')">
<jnpf-form-tip-item label="补送订单编号" v-if="judgeShow('redeliveryOrderCode')"
prop="redeliveryOrderCode">
<JnpfInput v-model="dataForm.redeliveryOrderCode"
@change="changeData('redeliveryOrderCode',-1)" placeholder="系统自动生成"
:disabled="judgeWrite('redeliveryOrderCode')" readonly :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('preparationTime')">
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')"
prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime"
@change="changeData('preparationTime',-1)" :startTime="dateTime(false,1,1,'','')"
:endTime="dateTime(false,1,1,'','')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remake')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remake')" prop="remake">
<JnpfTextarea v-model="dataForm.remake" @change="changeData('remake',-1)"
placeholder="请输入" :disabled="judgeWrite('remake')" :style='{"width":"100%"}' true
type="textarea" :autosize='{"minRows":4,"maxRows":4}'>
</JnpfTextarea>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="原订单信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.redeliveryoriginalorderrelationList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="单据编号"
v-if="judgeShow('redeliveryoriginalorderrelation-businessOrderCode')"
prop="businessOrderCode">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-businessOrderCode')">*</span>单据编号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessOrderCode"
@change="changeData('redeliveryoriginalorderrelation-businessOrderCode',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-businessOrderCode')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="客户名称"
v-if="judgeShow('redeliveryoriginalorderrelation-customName')" prop="customName">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-customName')">*</span>客户名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.customName"
@change="changeData('redeliveryoriginalorderrelation-customName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-customName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="发货仓库"
v-if="judgeShow('redeliveryoriginalorderrelation-deliveryWarehouse')"
prop="deliveryWarehouse">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-deliveryWarehouse')">*</span>发货仓库
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.deliveryWarehouse"
@change="changeData('redeliveryoriginalorderrelation-deliveryWarehouse',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-deliveryWarehouse')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品名称"
v-if="judgeShow('redeliveryoriginalorderrelation-productName')"
prop="productName">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-productName')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productName"
@change="changeData('redeliveryoriginalorderrelation-productName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-productName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位"
v-if="judgeShow('redeliveryoriginalorderrelation-saleUnit')" prop="saleUnit">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-saleUnit')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleUnit"
@change="changeData('redeliveryoriginalorderrelation-saleUnit',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-saleUnit')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售数量"
v-if="judgeShow('redeliveryoriginalorderrelation-saleNum')" prop="saleNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-saleNum')">*</span>销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleNum"
@change="changeData('redeliveryoriginalorderrelation-saleNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-saleNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="计划发货数量"
v-if="judgeShow('redeliveryoriginalorderrelation-planDeliveryNum')"
prop="planDeliveryNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-planDeliveryNum')">*</span>计划发货数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.planDeliveryNum"
@change="changeData('redeliveryoriginalorderrelation-planDeliveryNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-planDeliveryNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="缺货数量"
v-if="judgeShow('redeliveryoriginalorderrelation-shortageNum')"
prop="shortageNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-shortageNum')">*</span>缺货数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.shortageNum"
@change="changeData('redeliveryoriginalorderrelation-shortageNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-shortageNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="订货时间"
v-if="judgeShow('redeliveryoriginalorderrelation-reserveTime')"
prop="reserveTime">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryoriginalorderrelationList-reserveTime')">*</span>订货时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.reserveTime"
@change="changeData('redeliveryoriginalorderrelation-reserveTime',scope.$index)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
placeholder="请选择"
:disabled="judgeWrite('redeliveryoriginalorderrelationList')||judgeWrite('redeliveryoriginalorderrelationList-reserveTime')"
clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
v-if="!judgeWrite('redeliveryoriginalorderrelationList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delredeliveryoriginalorderrelationList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addredeliveryoriginalorderrelationList()"
v-if="!judgeWrite('redeliveryoriginalorderrelationList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="客户订货信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24"
v-if="judgeShow('redeliveryoriginalorderrelation-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.redeliveryproductrelationList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称"
v-if="judgeShow('redeliveryproductrelation-productName')" prop="productName">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-productName')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productName"
@change="changeData('redeliveryproductrelation-productName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-productName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="发货仓库"
v-if="judgeShow('redeliveryproductrelation-deliveryWarehouse')"
prop="deliveryWarehouse">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-deliveryWarehouse')">*</span>发货仓库
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.deliveryWarehouse"
@change="changeData('redeliveryproductrelation-deliveryWarehouse',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-deliveryWarehouse')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="客户名称"
v-if="judgeShow('redeliveryproductrelation-customName')" prop="customName">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-customName')">*</span>客户名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.customName"
@change="changeData('redeliveryproductrelation-customName',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-customName')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('redeliveryproductrelation-spec')"
prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('redeliveryproductrelation-spec',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位"
v-if="judgeShow('redeliveryproductrelation-inventoryUnit')" prop="inventoryUnit">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-inventoryUnit')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnit"
@change="changeData('redeliveryproductrelation-inventoryUnit',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-inventoryUnit')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位" v-if="judgeShow('redeliveryproductrelation-saleUnit')"
prop="saleUnit">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-saleUnit')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleUnit"
@change="changeData('redeliveryproductrelation-saleUnit',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-saleUnit')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="原销售数量"
v-if="judgeShow('redeliveryproductrelation-oldSaleNum')" prop="oldSaleNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-oldSaleNum')">*</span>原销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.oldSaleNum"
@change="changeData('redeliveryproductrelation-oldSaleNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-oldSaleNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="原期望送达时间开始"
v-if="judgeShow('redeliveryproductrelation-oldExpectArriveTimeStart')"
prop="oldExpectArriveTimeStart">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-oldExpectArriveTimeStart')">*</span>原期望送达时间开始
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.oldExpectArriveTimeStart"
@change="changeData('redeliveryproductrelation-oldExpectArriveTimeStart',scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-oldExpectArriveTimeStart')"
clearable :style='{"width":"100%"}'
:options="redeliveryproductrelationoldExpectArriveTimeStartOptions"
:props="redeliveryproductrelationoldExpectArriveTimeStartProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="新销售数量"
v-if="judgeShow('redeliveryproductrelation-newSaleNum')" prop="newSaleNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-newSaleNum')">*</span>新销售数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.newSaleNum"
@change="changeData('redeliveryproductrelation-newSaleNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-newSaleNum')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="新期望送达时间开始"
v-if="judgeShow('redeliveryproductrelation-newExpectArriveTimeStart')"
prop="newExpectArriveTimeStart">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('redeliveryproductrelationList-newExpectArriveTimeStart')">*</span>新期望送达时间开始
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.newExpectArriveTimeStart"
@change="changeData('redeliveryproductrelation-newExpectArriveTimeStart',scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('redeliveryproductrelationList')||judgeWrite('redeliveryproductrelationList-newExpectArriveTimeStart')"
clearable :style='{"width":"100%"}'
:options="redeliveryproductrelationnewExpectArriveTimeStartOptions"
:props="redeliveryproductrelationnewExpectArriveTimeStartProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
v-if="!judgeWrite('redeliveryproductrelationList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delredeliveryproductrelationList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addredeliveryproductrelationList()"
v-if="!judgeWrite('redeliveryproductrelationList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getFormById } from '@/api/workFlow/FormDesign'
import comMixin from '@/views/workFlow/workFlowForm/mixin';
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
mixins: [comMixin],
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
redeliveryoriginalorderrelationList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
redeliveryproductrelationList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
redeliveryoriginalorderrelationList: {
businessOrderCode: '',
businessOrderCodeOptions: [],
customName: '',
customNameOptions: [],
deliveryWarehouse: '',
deliveryWarehouseOptions: [],
productName: '',
productNameOptions: [],
saleUnit: '',
saleUnitOptions: [],
saleNum: '',
saleNumOptions: [],
planDeliveryNum: '',
planDeliveryNumOptions: [],
shortageNum: '',
shortageNumOptions: [],
reserveTime: '',
reserveTimeOptions: [],
enabledmark: undefined
},
redeliveryproductrelationList: {
productName: '',
productNameOptions: [],
deliveryWarehouse: '',
deliveryWarehouseOptions: [],
customName: '',
customNameOptions: [],
spec: '',
specOptions: [],
inventoryUnit: '',
inventoryUnitOptions: [],
saleUnit: '',
saleUnitOptions: [],
oldSaleNum: '',
oldSaleNumOptions: [],
oldExpectArriveTimeStartOptions: [],
newSaleNum: '',
newSaleNumOptions: [],
newExpectArriveTimeStartOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
redeliveryOrderCode: undefined,
preparationTime: undefined,
remake: undefined,
redeliveryoriginalorderrelationList: [],
redeliveryproductrelationList: [],
version: 0,
},
tableRequiredData: {},
dataRule:
{
preparationTime: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
},
redeliveryproductrelationoldExpectArriveTimeStartOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
redeliveryproductrelationoldExpectArriveTimeStartProps: { "label": "fullName", "value": "id" },
redeliveryproductrelationnewExpectArriveTimeStartOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
redeliveryproductrelationnewExpectArriveTimeStartProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
redeliveryOrderCode: [],
preparationTime: [],
remake: [],
redeliveryoriginalorderrelationbusinessOrderCode: [],
redeliveryoriginalorderrelationcustomName: [],
redeliveryoriginalorderrelationdeliveryWarehouse: [],
redeliveryoriginalorderrelationproductName: [],
redeliveryoriginalorderrelationsaleUnit: [],
redeliveryoriginalorderrelationsaleNum: [],
redeliveryoriginalorderrelationplanDeliveryNum: [],
redeliveryoriginalorderrelationshortageNum: [],
redeliveryoriginalorderrelationreserveTime: [],
redeliveryproductrelationproductName: [],
redeliveryproductrelationdeliveryWarehouse: [],
redeliveryproductrelationcustomName: [],
redeliveryproductrelationspec: [],
redeliveryproductrelationinventoryUnit: [],
redeliveryproductrelationsaleUnit: [],
redeliveryproductrelationoldSaleNum: [],
redeliveryproductrelationoldExpectArriveTimeStart: [],
redeliveryproductrelationnewSaleNum: [],
redeliveryproductrelationnewExpectArriveTimeStart: [],
},
}
},
computed: {
formOperates() {
return this.setting.formOperates
}
},
watch: {},
created() {
this.getFormById()
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) {
this.initDefaultData()
}
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
selfGetInfo(dataForm) {
this.dataInfo(dataForm)
},
beforeSubmit() {
const _data = this.dataList()
return _data
},
selfInit() {
this.dataAll()
},
getFormById() {
getFormById("524130475623583109").then(res => {
this.dataForm.flowId = res.data && res.data.flowId
// this.encode = res.data&&res.data.encode
})
},
exist() {
let isOk = true
for (let key in this.tableRequiredData) {
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
for (let i = 0; i < this.dataForm[key].length; i++) {
let item = this.dataForm[key][i]
inner: for (let id in item) {
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
if (!arr.length) continue inner
if (arr[0].required) {
let msg = `${arr[0].name}不能为空`
let boo = true
if (arr[0].dataType === 'array') {
boo = !this.jnpf.isEmptyArray(item[id])
} else {
boo = !this.jnpf.isEmpty(item[id])
}
if (!boo) {
this.$message({
message: msg,
type: 'error',
duration: 1000
})
isOk = false
break
}
}
}
}
}
}
if (!this.redeliveryoriginalorderrelationExist()) return
if (!this.redeliveryproductrelationExist()) return
return isOk
},
redeliveryoriginalorderrelationExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.redeliveryoriginalorderrelationList.length; i++) {
const e = this.dataForm.redeliveryoriginalorderrelationList[i];
}
return isOk;
},
redeliveryproductrelationExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.redeliveryproductrelationList.length; i++) {
const e = this.dataForm.redeliveryproductrelationList[i];
}
return isOk;
},
goBack() {
this.$emit('refresh')
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
//
initDefaultData() {
},
addredeliveryoriginalorderrelationList() {
let item = {
businessOrderCode: undefined,
customName: undefined,
deliveryWarehouse: undefined,
productName: undefined,
saleUnit: undefined,
saleNum: undefined,
planDeliveryNum: undefined,
shortageNum: undefined,
reserveTime: undefined,
}
this.getredeliveryoriginalorderrelationList(item)
},
delredeliveryoriginalorderrelationList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.redeliveryoriginalorderrelationList.splice(index, 1);
}).catch(() => {
});
},
getredeliveryoriginalorderrelationList(value) {
let item = { ...this.tableRows.redeliveryoriginalorderrelationList, ...value }
this.dataForm.redeliveryoriginalorderrelationList.push(item)
this.childIndex = this.dataForm.redeliveryoriginalorderrelationList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
addredeliveryproductrelationList() {
let item = {
productName: undefined,
deliveryWarehouse: undefined,
customName: undefined,
spec: undefined,
inventoryUnit: undefined,
saleUnit: undefined,
oldSaleNum: undefined,
oldExpectArriveTimeStart: '',
newSaleNum: undefined,
newExpectArriveTimeStart: '',
}
this.getredeliveryproductrelationList(item)
},
delredeliveryproductrelationList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.redeliveryproductrelationList.splice(index, 1);
}).catch(() => {
});
},
getredeliveryproductrelationList(value) {
let item = { ...this.tableRows.redeliveryproductrelationList, ...value }
this.dataForm.redeliveryproductrelationList.push(item)
this.childIndex = this.dataForm.redeliveryproductrelationList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.redeliveryoriginalorderrelationList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.redeliveryproductrelationList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,642 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="凭证编号">
<el-input v-model="query.voucherCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="凭证类型">
<JnpfSelect v-model="query.voucherType" placeholder="请选择" clearable
:options="voucherTypeOptions" :props="voucherTypeProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="制单时间">
<JnpfDateRangePicker v-model="query.preparationTime" format="yyyy-MM-dd"
startPlaceholder="开始日期" endPlaceholder="结束日期">
</JnpfDateRangePicker>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="磅单编号">
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<el-table-column prop="voucherCode" label="凭证编号" align="left">
</el-table-column>
<el-table-column label="单据类型" prop="documentType" algin="left">
<template slot-scope="scope">
{{ scope.row.documentType}}
</template>
</el-table-column>
<el-table-column label="凭证类型" prop="voucherType" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherType}}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus}}
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="left">
</el-table-column>
<el-table-column prop="associatedDocumentNo" label="关联单据号" align="left">
</el-table-column>
<el-table-column prop="vehicleName" label="车牌号" align="left">
</el-table-column>
<el-table-column label="运输方式" prop="modeTransport" algin="left">
<template slot-scope="scope">
{{ scope.row.modeTransport}}
</template>
</el-table-column>
<el-table-column label="承运方式" prop="transportationMethod" algin="left">
<template slot-scope="scope">
{{ scope.row.transportationMethod}}
</template>
</el-table-column>
<el-table-column prop="carrier" label="承运商" align="left">
</el-table-column>
<el-table-column prop="freight" label="运费" align="left">
</el-table-column>
<el-table-column prop="placeDispatch" label="起运地" align="left">
</el-table-column>
<el-table-column prop="destination" label="到达地" align="left">
</el-table-column>
<el-table-column prop="associateThirdSuppliers" label="三级供应商" align="left">
</el-table-column>
<el-table-column prop="preparationTime" label="制单时间" align="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body
:visible.sync="flowListVisible" class="JNPF-dialog template-dialog JNPF-dialog_center"
lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id"
@click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getFormById } from '@/api/workFlow/FormDesign'
import { getFlowList } from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
poundCode: undefined,
businessType: "1",
documentType: "1"
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
voucherTypeOptions: [{ "fullName": "磅单", "id": "1" }, { "fullName": "收据", "id": "2" }, { "fullName": "其他", "id": "3" }],
voucherTypeProps: { "label": "fullName", "value": "id" },
modeTransportOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
modeTransportProps: { "label": "fullName", "value": "id" },
transportationMethodOptions: [{ "fullName": "仓库承运(DC)", "id": "1" }, { "fullName": "承运商", "id": "2" }, { "fullName": "供应商", "id": "3" }, { "fullName": "自提", "id": "4" }],
transportationMethodProps: { "label": "fullName", "value": "id" },
voucherStatusOptions: [{ "fullName": "待提交", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "已驳回", "id": "3" }, { "fullName": "待确认", "id": "4" }, { "fullName": "待收货", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "已取消", "id": "7" }],
voucherStatusProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
documentTypeProps: { "label": "fullName", "value": "id" },
tableField111_productIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
tableField140_vehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
interfaceRes: {
associateThirdSuppliers: [],
tableField111_productId: [],
tableField140_vehicleId: [],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("1760230311607619586").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '1760230311607619586',
type: 1,
};
request({
url: `/api/scm/Voucher/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/Voucher")
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/batchRemove`,
data: ids,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/Voucher/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,4 +1,8 @@
<template>
<template>
<div :style="{margin: '0 auto',width:'100%'}">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
@ -22,8 +26,8 @@
<el-col :span="8" v-if="judgeShow('voucherType')">
<jnpf-form-tip-item label="凭证类型" v-if="judgeShow('voucherType')" prop="voucherType">
<JnpfSelect v-model="dataForm.voucherType" @change="changeData('voucherType',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}' :options="voucherTypeOptions"
:props="voucherTypeProps">
placeholder="请选择" :disabled="judgeWrite('voucherType')" clearable
:style='{"width":"100%"}' :options="voucherTypeOptions" :props="voucherTypeProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
@ -33,8 +37,9 @@
prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime"
@change="changeData('preparationTime',-1)" :startTime="dateTime(false,1,1,'','')"
:endTime="dateTime(false,1,1,'','')" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd">
:endTime="dateTime(false,1,1,'','')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
@ -113,12 +118,17 @@
v-if="judgeRequired('voucherproductList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.productId"
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId',scope.$index)"
placeholder="请输入"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList')||judgeWrite('voucherproductList-productId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId'+scope.$index"
interfaceId="529919666429100229" :pageSize="20"
:columnOptions="voucherproductproductIdcolumnOptions" clearable
:style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('voucherproduct-spec')" prop="spec">
@ -308,109 +318,98 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-row>
<el-col :span="6" v-if="judgeShow('vehiclePictures')">
<jnpf-form-tip-item label="车辆信息" v-if="judgeShow('vehiclePictures')"
prop="vehiclePictures">
<JnpfUploadImg v-model="dataForm.vehiclePictures"
@change="changeData('vehiclePictures',-1)"
:disabled="judgeWrite('vehiclePictures')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('vehiclePictures1')">
<jnpf-form-tip-item label="车辆45度图片" v-if="judgeShow('vehiclePictures1')"
prop="vehiclePictures1">
<JnpfUploadImg v-model="dataForm.vehiclePictures1"
@change="changeData('vehiclePictures1',-1)"
:disabled="judgeWrite('vehiclePictures1')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('vehiclePictures2')">
<jnpf-form-tip-item label="车辆货物图片" v-if="judgeShow('vehiclePictures2')"
prop="vehiclePictures2">
<JnpfUploadImg v-model="dataForm.vehiclePictures2"
@change="changeData('vehiclePictures2',-1)"
:disabled="judgeWrite('vehiclePictures2')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="6" v-if="judgeShow('driverPictures')">
<jnpf-form-tip-item label="驾驶员信息" v-if="judgeShow('driverPictures')"
prop="driverPictures">
<JnpfUploadImg v-model="dataForm.driverPictures"
@change="changeData('driverPictures',-1)" :disabled="judgeWrite('driverPictures')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('driverPictures1')">
<jnpf-form-tip-item label="驾驶员信息行驶证图片" v-if="judgeShow('driverPictures1')"
prop="driverPictures1">
<JnpfUploadImg v-model="dataForm.driverPictures1"
@change="changeData('driverPictures1',-1)"
:disabled="judgeWrite('driverPictures1')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('driverPictures2')">
<jnpf-form-tip-item label="驾驶员信息身份证图片" v-if="judgeShow('driverPictures2')"
prop="driverPictures2">
<JnpfUploadImg v-model="dataForm.driverPictures2"
@change="changeData('driverPictures2',-1)"
:disabled="judgeWrite('driverPictures2')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="6" v-if="judgeShow('weighPictures')">
<jnpf-form-tip-item label="过磅信息正面图片" v-if="judgeShow('weighPictures')"
prop="weighPictures">
<JnpfUploadImg v-model="dataForm.weighPictures"
@change="changeData('weighPictures',-1)" :disabled="judgeWrite('weighPictures')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('weighPictures1')">
<jnpf-form-tip-item label="过磅信息后面图片" v-if="judgeShow('weighPictures1')"
prop="weighPictures1">
<JnpfUploadImg v-model="dataForm.weighPictures1"
@change="changeData('weighPictures1',-1)" :disabled="judgeWrite('weighPictures1')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('weighPictures2')">
<jnpf-form-tip-item label="过磅信息过磅图片" v-if="judgeShow('weighPictures2')"
prop="weighPictures2">
<JnpfUploadImg v-model="dataForm.weighPictures2"
@change="changeData('weighPictures2',-1)" :disabled="judgeWrite('weighPictures2')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="6" v-if="judgeShow('weighPictures3')">
<jnpf-form-tip-item label="过磅信息货物图片" v-if="judgeShow('weighPictures3')"
prop="weighPictures3">
<JnpfUploadImg v-model="dataForm.weighPictures3"
@change="changeData('weighPictures3',-1)" :disabled="judgeWrite('weighPictures3')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
</el-row>
<el-col :span="8" v-if="judgeShow('vehiclePictures')">
<jnpf-form-tip-item label="车辆信息" v-if="judgeShow('vehiclePictures')"
prop="vehiclePictures">
<JnpfUploadImg v-model="dataForm.vehiclePictures"
@change="changeData('vehiclePictures',-1)" :disabled="judgeWrite('vehiclePictures')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('vehiclePictures1')">
<jnpf-form-tip-item label="车辆45度图片" v-if="judgeShow('vehiclePictures1')"
prop="vehiclePictures1">
<JnpfUploadImg v-model="dataForm.vehiclePictures1"
@change="changeData('vehiclePictures1',-1)"
:disabled="judgeWrite('vehiclePictures1')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('vehiclePictures2')">
<jnpf-form-tip-item label="车辆货物图片" v-if="judgeShow('vehiclePictures2')"
prop="vehiclePictures2">
<JnpfUploadImg v-model="dataForm.vehiclePictures2"
@change="changeData('vehiclePictures2',-1)"
:disabled="judgeWrite('vehiclePictures2')" :fileSize="10" sizeUnit="MB" :limit="9"
pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('driverPictures')">
<jnpf-form-tip-item label="驾驶员信息" v-if="judgeShow('driverPictures')"
prop="driverPictures">
<JnpfUploadImg v-model="dataForm.driverPictures"
@change="changeData('driverPictures',-1)" :disabled="judgeWrite('driverPictures')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('driverPictures1')">
<jnpf-form-tip-item label="驾驶员信息行驶证图片" v-if="judgeShow('driverPictures1')"
prop="driverPictures1">
<JnpfUploadImg v-model="dataForm.driverPictures1"
@change="changeData('driverPictures1',-1)" :disabled="judgeWrite('driverPictures1')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('driverPictures2')">
<jnpf-form-tip-item label="驾驶员信息身份证图片" v-if="judgeShow('driverPictures2')"
prop="driverPictures2">
<JnpfUploadImg v-model="dataForm.driverPictures2"
@change="changeData('driverPictures2',-1)" :disabled="judgeWrite('driverPictures2')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('weighPictures')">
<jnpf-form-tip-item label="过磅信息正面图片" v-if="judgeShow('weighPictures')"
prop="weighPictures">
<JnpfUploadImg v-model="dataForm.weighPictures"
@change="changeData('weighPictures',-1)" :disabled="judgeWrite('weighPictures')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('weighPictures1')">
<jnpf-form-tip-item label="过磅信息后面图片" v-if="judgeShow('weighPictures1')"
prop="weighPictures1">
<JnpfUploadImg v-model="dataForm.weighPictures1"
@change="changeData('weighPictures1',-1)" :disabled="judgeWrite('weighPictures1')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('weighPictures2')">
<jnpf-form-tip-item label="过磅信息过磅图片" v-if="judgeShow('weighPictures2')"
prop="weighPictures2">
<JnpfUploadImg v-model="dataForm.weighPictures2"
@change="changeData('weighPictures2',-1)" :disabled="judgeWrite('weighPictures2')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('weighPictures3')">
<jnpf-form-tip-item label="过磅信息货物图片" v-if="judgeShow('weighPictures3')"
prop="weighPictures3">
<JnpfUploadImg v-model="dataForm.weighPictures3"
@change="changeData('weighPictures3',-1)" :disabled="judgeWrite('weighPictures3')"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
@ -418,19 +417,24 @@
</div>
<el-table :data="dataForm.voucherVehicleList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车辆id" v-if="judgeShow('vouchervehicle-vehicleId')"
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')"
prop="vehicleId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>辆id
v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>牌号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.vehicleId"
<JnpfPopupSelect v-model="scope.row.vehicleId"
@change="changeData('vouchervehicle-vehicleId',scope.$index)"
placeholder="请输入"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.vouchervehiclevehicleId" placeholder="请选择"
:disabled="judgeWrite('vouchervehicleList')||judgeWrite('vouchervehicleList-vehicleId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='vehicle_number' :field="'vehicleId'+scope.$index"
interfaceId="529920852288864453" :pageSize="20"
:columnOptions="vouchervehiclevehicleIdcolumnOptions" clearable
:style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')"
@ -490,7 +494,7 @@
</div>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('voucherStatus')">
<!-- <el-col :span="24" v-if="judgeShow('voucherStatus')">
<jnpf-form-tip-item label="凭证状态" v-if="judgeShow('voucherStatus')" prop="voucherStatus">
<JnpfSelect v-model="dataForm.voucherStatus" @change="changeData('voucherStatus',-1)"
placeholder="请选择" :disabled="judgeWrite('voucherStatus')" clearable
@ -515,7 +519,7 @@
:disabled="judgeWrite('associatedDocumentNo')" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
@ -628,13 +632,13 @@ export default {
weighPictures1: [],
weighPictures2: [],
weighPictures3: [],
voucherStatus: "1",
documentType: "2",
associatedDocumentNo: undefined,
voucherProductList: [],
voucherVehicleList: [],
version: 0,
voucherSource: '1',
voucherStatus: '1',
documentType: '2',
businessType: undefined,
},
tableRequiredData: {},
dataRule:
@ -763,6 +767,8 @@ export default {
voucherStatusProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
documentTypeProps: { "label": "fullName", "value": "id" },
voucherproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
childIndex: -1,
isEdit: false,
interfaceRes: {
@ -820,6 +826,7 @@ export default {
this.getFormById()
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) {
this.initDefaultData()
this.dataForm.businessType = "2"
}
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
@ -941,8 +948,11 @@ export default {
},
addvoucherproductList() {
if (this.dataForm.voucherProductList.length > 0) {
return
}
let item = {
productId: undefined,
productId: '',
spec: undefined,
unit: undefined,
grossWeight: undefined,
@ -971,8 +981,11 @@ export default {
this.childIndex = -1
},
addvouchervehicleList() {
if (this.dataForm.voucherVehicleList.length > 0) {
return
}
let item = {
vehicleId: undefined,
vehicleId: '',
driverName: undefined,
telephone: undefined,
carrier: undefined,

@ -1,3 +1,10 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
@ -15,13 +22,6 @@
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="凭证状态">
<JnpfSelect v-model="query.voucherStatus" placeholder="请选择" clearable
:options="voucherStatusOptions" :props="voucherStatusProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="制单时间">
<JnpfDateRangePicker v-model="query.preparationTime" format="yyyy-MM-dd"
@ -35,12 +35,6 @@
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="-商品名称">
<el-input v-model="query.tableField111_productId" placeholder="请输入" clearable>
</el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
@ -226,7 +220,8 @@ export default {
voucherType: undefined,
preparationTime: undefined,
poundCode: undefined,
tableField111_productId: undefined,
businessType: "2",
documentType: "2"
},
treeProps: {
children: 'children',
@ -260,8 +255,12 @@ export default {
voucherStatusProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
documentTypeProps: { "label": "fullName", "value": "id" },
tableField111_productIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
tableField140_vehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
interfaceRes: {
associateThirdSuppliers: [],
tableField111_productId: [],
tableField140_vehicleId: [],
},
}
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,642 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="凭证编号">
<el-input v-model="query.voucherCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="凭证类型">
<JnpfSelect v-model="query.voucherType" placeholder="请选择" clearable
:options="voucherTypeOptions" :props="voucherTypeProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="制单时间">
<JnpfDateRangePicker v-model="query.preparationTime" format="yyyy-MM-dd"
startPlaceholder="开始日期" endPlaceholder="结束日期">
</JnpfDateRangePicker>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="磅单编号">
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<el-table-column prop="voucherCode" label="凭证编号" align="left">
</el-table-column>
<el-table-column label="单据类型" prop="documentType" algin="left">
<template slot-scope="scope">
{{ scope.row.documentType}}
</template>
</el-table-column>
<el-table-column label="凭证类型" prop="voucherType" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherType}}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus}}
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="left">
</el-table-column>
<el-table-column prop="associatedDocumentNo" label="关联单据号" align="left">
</el-table-column>
<el-table-column prop="vehicleName" label="车牌号" align="left">
</el-table-column>
<el-table-column label="运输方式" prop="modeTransport" algin="left">
<template slot-scope="scope">
{{ scope.row.modeTransport}}
</template>
</el-table-column>
<el-table-column label="承运方式" prop="transportationMethod" algin="left">
<template slot-scope="scope">
{{ scope.row.transportationMethod}}
</template>
</el-table-column>
<el-table-column prop="carrier" label="承运商" align="left">
</el-table-column>
<el-table-column prop="freight" label="运费" align="left">
</el-table-column>
<el-table-column prop="placeDispatch" label="起运地" align="left">
</el-table-column>
<el-table-column prop="destination" label="到达地" align="left">
</el-table-column>
<el-table-column prop="associateThirdSuppliers" label="三级供应商" align="left">
</el-table-column>
<el-table-column prop="preparationTime" label="制单时间" align="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body
:visible.sync="flowListVisible" class="JNPF-dialog template-dialog JNPF-dialog_center"
lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id"
@click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getFormById } from '@/api/workFlow/FormDesign'
import { getFlowList } from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
poundCode: undefined,
businessType: "2",
documentType: "1"
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
voucherTypeOptions: [{ "fullName": "磅单", "id": "1" }, { "fullName": "收据", "id": "2" }, { "fullName": "其他", "id": "3" }],
voucherTypeProps: { "label": "fullName", "value": "id" },
modeTransportOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
modeTransportProps: { "label": "fullName", "value": "id" },
transportationMethodOptions: [{ "fullName": "仓库承运(DC)", "id": "1" }, { "fullName": "承运商", "id": "2" }, { "fullName": "供应商", "id": "3" }, { "fullName": "自提", "id": "4" }],
transportationMethodProps: { "label": "fullName", "value": "id" },
voucherStatusOptions: [{ "fullName": "待提交", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "已驳回", "id": "3" }, { "fullName": "待确认", "id": "4" }, { "fullName": "待收货", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "已取消", "id": "7" }],
voucherStatusProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
documentTypeProps: { "label": "fullName", "value": "id" },
tableField111_productIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
tableField140_vehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
interfaceRes: {
associateThirdSuppliers: [],
tableField111_productId: [],
tableField140_vehicleId: [],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("1760139272301498370").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '1760139272301498370',
type: 1,
};
request({
url: `/api/scm/Voucher/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/Voucher")
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Voucher/batchRemove`,
data: ids,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/Voucher/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({ type: 'error', message: '流程不存在' });
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -528,232 +528,467 @@
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderProductRelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称"
v-if="judgeShow('businessorderproductrelational-productId')" prop="productId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productInfo"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.businessorderproductrelationalproductId"
placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='commodity_name'
:field="'productId'+scope.$index" interfaceId="523160915206474309"
:pageSize="20"
:columnOptions="businessorderproductrelationalproductIdcolumnOptions"
clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('businessorderproductrelational-spec')"
prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位"
v-if="judgeShow('businessorderproductrelational-inventoryUnitId')"
prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-inventoryUnitId')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('businessorderproductrelational-inventoryUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-inventoryUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存"
v-if="judgeShow('businessorderproductrelational-realBound')" prop="realBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-realBound')">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.realBound"
@change="changeData('businessorderproductrelational-realBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-realBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="可用库存"
v-if="judgeShow('businessorderproductrelational-useBound')" prop="useBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-useBound')">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound"
@change="changeData('businessorderproductrelational-useBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-useBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位"
v-if="judgeShow('businessorderproductrelational-salesMainUnitId')"
prop="salesMainUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-salesMainUnitId')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.salesMainUnitId"
@change="changeData('businessorderproductrelational-salesMainUnitId',scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-salesMainUnitId')"
clearable :style='{"width":"100%"}'
:options="businessorderproductrelationalsalesMainUnitIdOptions"
:props="businessorderproductrelationalsalesMainUnitIdProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="业务数量"
v-if="judgeShow('businessorderproductrelational-businessNum')" prop="businessNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>业务数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessNum"
@change="changeData('businessorderproductrelational-businessNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessNum')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="业务单价"
v-if="judgeShow('businessorderproductrelational-businessPrice')"
prop="businessPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessPrice')">*</span>业务单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessPrice"
@change="changeData('businessorderproductrelational-businessPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessPrice')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('businessorderproductrelational-tax')"
prop="tax">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-tax')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tax"
@change="changeData('businessorderproductrelational-tax',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-tax')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税小计"
v-if="judgeShow('businessorderproductrelational-taxCount')" prop="taxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-taxCount')">*</span>含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxCount"
@change="changeData('businessorderproductrelational-taxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-taxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税单价"
v-if="judgeShow('businessorderproductrelational-notTaxPrice')" prop="notTaxPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxPrice')">*</span>不含税单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxPrice"
@change="changeData('businessorderproductrelational-notTaxPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxPrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税小计"
v-if="judgeShow('businessorderproductrelational-notTaxCount')" prop="notTaxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxCount')">*</span>不含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxCount"
@change="changeData('businessorderproductrelational-notTaxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="上一次销售单价"
v-if="judgeShow('businessorderproductrelational-lastSalePrice')"
prop="lastSalePrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-lastSalePrice')">*</span>上一次销售单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.lastSalePrice"
@change="changeData('businessorderproductrelational-lastSalePrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-lastSalePrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
<template v-if="dataForm.orderType == 1">
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderProductRelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称"
v-if="judgeShow('businessorderproductrelational-productId')" prop="productId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productInfo"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.businessorderproductrelationalproductId"
placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' :field="'productId'+scope.$index"
interfaceId="530009896687501829" :pageSize="20"
:columnOptions="businessorderproductrelationalproductIdcolumnOptions2"
clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格"
v-if="judgeShow('businessorderproductrelational-spec')" prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位"
v-if="judgeShow('businessorderproductrelational-inventoryUnitId')"
prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-inventoryUnitId')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('businessorderproductrelational-inventoryUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-inventoryUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存"
v-if="judgeShow('businessorderproductrelational-realBound')" prop="realBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-realBound')">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.realBound"
@change="changeData('businessorderproductrelational-realBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-realBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="可用库存"
v-if="judgeShow('businessorderproductrelational-useBound')" prop="useBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-useBound')">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound"
@change="changeData('businessorderproductrelational-useBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-useBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位"
v-if="judgeShow('businessorderproductrelational-salesMainUnitId')"
prop="salesMainUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-salesMainUnitId')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.salesMainUnitId"
@change="changeData('businessorderproductrelational-salesMainUnitId',scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-salesMainUnitId')"
clearable :style='{"width":"100%"}'
:options="businessorderproductrelationalsalesMainUnitIdOptions"
:props="businessorderproductrelationalsalesMainUnitIdProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="业务数量"
v-if="judgeShow('businessorderproductrelational-businessNum')"
prop="businessNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>业务数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessNum"
@change="changeData('businessorderproductrelational-businessNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessNum')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="业务单价"
v-if="judgeShow('businessorderproductrelational-businessPrice')"
prop="businessPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessPrice')">*</span>业务单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessPrice"
@change="changeData('businessorderproductrelational-businessPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessPrice')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('businessorderproductrelational-tax')"
prop="tax">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-tax')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tax"
@change="changeData('businessorderproductrelational-tax',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-tax')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税小计"
v-if="judgeShow('businessorderproductrelational-taxCount')" prop="taxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-taxCount')">*</span>含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxCount"
@change="changeData('businessorderproductrelational-taxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-taxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税单价"
v-if="judgeShow('businessorderproductrelational-notTaxPrice')"
prop="notTaxPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxPrice')">*</span>不含税单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxPrice"
@change="changeData('businessorderproductrelational-notTaxPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxPrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税小计"
v-if="judgeShow('businessorderproductrelational-notTaxCount')"
prop="notTaxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxCount')">*</span>不含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxCount"
@change="changeData('businessorderproductrelational-notTaxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="上一次销售单价"
v-if="judgeShow('businessorderproductrelational-lastSalePrice')"
prop="lastSalePrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-lastSalePrice')">*</span>上一次销售单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.lastSalePrice"
@change="changeData('businessorderproductrelational-lastSalePrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-lastSalePrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
v-if="!judgeWrite('businessorderproductrelationalList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addbusinessorderproductrelationalList()"
v-if="!judgeWrite('businessorderproductrelationalList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addbusinessorderproductrelationalList()"
v-if="!judgeWrite('businessorderproductrelationalList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
</template>
<template v-if="dataForm.orderType == 2">
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderProductRelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称"
v-if="judgeShow('businessorderproductrelational-productId')" prop="productId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productInfo2"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.businessorderproductrelationalproductId"
placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='commodity_name'
:field="'productId'+scope.$index" interfaceId="523160915206474309"
:pageSize="20"
:columnOptions="businessorderproductrelationalproductIdcolumnOptions"
clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格"
v-if="judgeShow('businessorderproductrelational-spec')" prop="spec">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-spec')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位"
v-if="judgeShow('businessorderproductrelational-inventoryUnitId')"
prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-inventoryUnitId')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('businessorderproductrelational-inventoryUnitId',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-inventoryUnitId')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存"
v-if="judgeShow('businessorderproductrelational-realBound')" prop="realBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-realBound')">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.realBound"
@change="changeData('businessorderproductrelational-realBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-realBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="可用库存"
v-if="judgeShow('businessorderproductrelational-useBound')" prop="useBound">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-useBound')">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound"
@change="changeData('businessorderproductrelational-useBound',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-useBound')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位"
v-if="judgeShow('businessorderproductrelational-salesMainUnitId')"
prop="salesMainUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-salesMainUnitId')">*</span>销售单位
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.salesMainUnitId"
@change="changeData('businessorderproductrelational-salesMainUnitId',scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-salesMainUnitId')"
clearable :style='{"width":"100%"}'
:options="businessorderproductrelationalsalesMainUnitIdOptions"
:props="businessorderproductrelationalsalesMainUnitIdProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="业务数量"
v-if="judgeShow('businessorderproductrelational-businessNum')"
prop="businessNum">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>业务数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessNum"
@change="changeData('businessorderproductrelational-businessNum',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessNum')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="业务单价"
v-if="judgeShow('businessorderproductrelational-businessPrice')"
prop="businessPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessPrice')">*</span>业务单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.businessPrice"
@change="changeData('businessorderproductrelational-businessPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-businessPrice')"
addonAfter="吨" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('businessorderproductrelational-tax')"
prop="tax">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-tax')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tax"
@change="changeData('businessorderproductrelational-tax',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-tax')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税小计"
v-if="judgeShow('businessorderproductrelational-taxCount')" prop="taxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-taxCount')">*</span>含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxCount"
@change="changeData('businessorderproductrelational-taxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-taxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税单价"
v-if="judgeShow('businessorderproductrelational-notTaxPrice')"
prop="notTaxPrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxPrice')">*</span>不含税单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxPrice"
@change="changeData('businessorderproductrelational-notTaxPrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxPrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税小计"
v-if="judgeShow('businessorderproductrelational-notTaxCount')"
prop="notTaxCount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxCount')">*</span>不含税小计
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxCount"
@change="changeData('businessorderproductrelational-notTaxCount',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-notTaxCount')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="上一次销售单价"
v-if="judgeShow('businessorderproductrelational-lastSalePrice')"
prop="lastSalePrice">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-lastSalePrice')">*</span>上一次销售单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.lastSalePrice"
@change="changeData('businessorderproductrelational-lastSalePrice',scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList')||judgeWrite('businessorderproductrelationalList-lastSalePrice')"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
v-if="!judgeWrite('businessorderproductrelationalList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addbusinessorderproductrelationalList()"
v-if="!judgeWrite('businessorderproductrelationalList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
</template>
<!-- <el-col :span="24" v-if="judgeShow('status')">
<jnpf-form-tip-item label="状态" v-if="judgeShow('status')" prop="status">
<JnpfSelect v-model="dataForm.status" @change="changeData('status',-1)"
@ -1049,6 +1284,7 @@ export default {
settlementinfooverdueInterestRateOptions: [{ "fullName": "按年化", "id": "1" }, { "fullName": "按月化", "id": "fCgxew1" }],
settlementinfooverdueInterestRateProps: { "label": "fullName", "value": "id" },
businessorderproductrelationalproductIdcolumnOptions: [{ "label": "商品编码", "value": "commodity_code" }, { "label": "商品名称", "value": "commodity_name" }, { "label": "商品规格", "value": "specifications" },],
businessorderproductrelationalproductIdcolumnOptions2: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "商品规格", "value": "spec" },],
businessorderproductrelationalsalesMainUnitIdOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
businessorderproductrelationalsalesMainUnitIdProps: { "label": "fullName", "value": "id" },
childIndex: -1,
@ -1127,6 +1363,12 @@ export default {
this.dataForm.businessOrderProductRelationalList.push(val2)
this.dataForm.businessOrderProductRelationalList.splice(0, 1)
},
productInfo2(val, val2) {
debugger
// this.dataForm.businessOrderProductRelationalList = []
this.dataForm.businessOrderProductRelationalList.push(val2)
this.dataForm.businessOrderProductRelationalList.splice(0, 1)
},
contractInfo(val, val2) {
this.dataForm.contractList = []
this.dataForm.contractList[0] = val2

@ -57,7 +57,7 @@
:formData="dataForm" :templateJson="interfaceRes.businessId" placeholder="请选择"
:disabled="judgeWrite('businessId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='code' field='businessId'
interfaceId="529307088124379205" :pageSize="20"
interfaceId="529638640356183877" :pageSize="20"
:columnOptions="businessIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
@ -364,7 +364,7 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.warehousingproductList" size='mini'>
<el-table :data="dataForm.warehousingProductList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('warehousingproduct-productName')"
prop="productName">
@ -469,7 +469,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="包装条码" v-if="judgeShow('warehousingproduct-barCode')"
<!-- <el-table-column label="包装条码" v-if="judgeShow('warehousingproduct-barCode')"
prop="barCode">
<template slot="header">
<span class="required-sign"
@ -483,7 +483,7 @@
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="通知出库数量"
v-if="judgeShow('warehousingproduct-notificationStorageNumber')"
prop="notificationStorageNumber">
@ -500,7 +500,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="体积" v-if="judgeShow('warehousingproduct-volume')"
<!-- <el-table-column label="体积" v-if="judgeShow('warehousingproduct-volume')"
prop="volume">
<template slot="header">
<span class="required-sign"
@ -514,7 +514,7 @@
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="批次号" v-if="judgeShow('warehousingproduct-batchNo')"
prop="batchNo">
<template slot="header">
@ -619,13 +619,13 @@ export default {
currTableConf: {},
dataValueAll: {},
addTableConf: {
warehousingproductList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
warehousingProductList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
warehousingproductList: {
warehousingProductList: {
productName: '',
productNameOptions: [],
spec: '',
@ -668,7 +668,7 @@ export default {
warehouseId: undefined,
deliveryAddress: undefined,
remark: undefined,
warehousingproductList: [],
warehousingProductList: [],
saleOrderInfo: [],
version: 0,
},
@ -730,11 +730,17 @@ export default {
getSaleOrder(val, val2) {
debugger
this.dataForm.saleOrderInfo[0] = val2
this.dataForm.subjectBasicId = val2.first_subject_basic_id
this.dataForm.subjectBasicId = val2.firstSubjectBasicId
this.dataForm.shippingAddress = val2.receiveAddress
this.dataForm.enterpriseId = val2.enterprise_id
this.dataForm.warehouseId = val2.delivery_warehouse
this.dataForm.deliveryAddress = val2.delivery_address
this.dataForm.enterpriseId = val2.enterpriseId
this.dataForm.warehouseId = val2.deliveryWarehouse
this.dataForm.deliveryAddress = val2.deliveryAddress
val2.businessOrderProductRelationalList.forEach((item, index) => {
item.productName = item.name
item.purchaseUnitId = item.salesMainUnitId
item.purchaseNum = item.businessNum
})
this.dataForm.warehousingProductList = val2.businessOrderProductRelationalList
},
changeData(model, index) {
this.isEdit = false
@ -828,8 +834,8 @@ export default {
},
warehousingproductExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.warehousingproductList.length; i++) {
const e = this.dataForm.warehousingproductList[i];
for (let i = 0; i < this.dataForm.warehousingProductList.length; i++) {
const e = this.dataForm.warehousingProductList[i];
}
return isOk;
},
@ -865,14 +871,14 @@ export default {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.warehousingproductList.splice(index, 1);
this.dataForm.warehousingProductList.splice(index, 1);
}).catch(() => {
});
},
getwarehousingproductList(value) {
let item = { ...this.tableRows.warehousingproductList, ...value }
this.dataForm.warehousingproductList.push(item)
this.childIndex = this.dataForm.warehousingproductList.length - 1
let item = { ...this.tableRows.warehousingProductList, ...value }
this.dataForm.warehousingProductList.push(item)
this.childIndex = this.dataForm.warehousingProductList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
@ -965,7 +971,7 @@ export default {
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.warehousingproductList.length; i++) {
for (let i = 0; i < _dataAll.warehousingProductList.length; i++) {
this.childIndex = i
}
this.childIndex = -1

Loading…
Cancel
Save