采购订单修改和运管接口

jg-waiwang-pro
vayne 6 months ago
parent a46b213e9d
commit 1277dddcf4

@ -712,7 +712,7 @@
LEFT JOIN jg_contract c ON a.contract_id = c.id AND c.f_delete_mark is NULL
LEFT JOIN jg_subject_basic d ON a.second_subject_basic_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic e ON a.third_subject_basic_id = e.id AND e.f_delete_mark IS NULL
LEFT JOIN jg_business_line f ON a.second_subject_basic_id = f.id AND f.f_delete_mark IS NULL
LEFT JOIN jg_business_line f ON a.business_line_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
</select>
@ -755,11 +755,15 @@
WHEN '2' THEN '直送'
END AS deliveryType1,
b.NAME AS subjectName,
c.contract_name AS contractName
c.contract_name AS contractName,
d.name as secondCustomName,
e.name as businessLineName
FROM
jg_business_order a
LEFT JOIN jg_subject_basic b ON a.first_subject_basic_id = b.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_contract c ON a.contract_id = c.id AND c.f_delete_mark is NULL
LEFT JOIN jg_subject_basic d ON a.second_subject_basic_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN jg_business_line e ON a.business_line_id = e.id AND e.f_delete_mark IS NULL
${ew.customSqlSegment}
</select>
<select id="queryCurrentDayNum" resultType="java.math.BigDecimal">
@ -775,4 +779,86 @@
where business_type = #{businessOrderEntity.businessType} and b.f_status = 2 and
date_format(a.f_last_modify_time,'%Y-%m') = #{businessOrderEntity.searchDateString}) AND product_id = #{businessOrderEntity.productId}
</select>
<select id="queryPurchaseOrderByYunGuan" resultType="jnpf.model.yunguan.YunguanPurchaseOrderModel">
SELECT
c.f_en_code AS COMP_CD,
b.kucun_org_code AS INV_ORG_CD,
b.kucun_org_name AS INV_ORG_NM,
d.f_en_code AS DEPT_CD,
d.f_full_name AS DEPT_NM,
e.f_real_name AS PUR_EMP_NM,
a.CODE AS ORD_NO,
f.contract_number AS CONTR_CD,
f.contract_name AS CONTR_NM,
f.contract_no AS RESERVE1,
f.contract_signed_time AS CONTR_DT,
a.expect_arrive_date_start AS DELV_DT,
b.CODE AS SUPPLIER_CD,
b.NAME AS SUPPLIER_NM,
f.supplier_site_id AS SUPPLIER_SITE_ID,
f.supplier_site_name AS RESERVE2,
'CYN' AS CURRENCY_CD,
CASE
a.transaction_mode
WHEN '1' THEN
'快递交货'
WHEN '2' THEN
'送货上门'
WHEN '3' THEN
'上门提货'
END AS DELV_MTH,
CASE
a.transport_mode
WHEN '1' THEN
'公路'
WHEN '2' THEN
'铁路'
WHEN '3' THEN
'轮船'
WHEN '4' THEN
'空运'
WHEN '5' THEN
'无'
END AS TRS_MTH,
CASE
b.payment_method
WHEN '1' THEN
'无'
WHEN '2' THEN
'现金'
WHEN '3' THEN
'银行转账'
WHEN '4' THEN
'承兑汇票'
WHEN '5' THEN
'支付宝'
WHEN '6' THEN
'微信'
WHEN '7' THEN
'现汇'
END AS PAY_MTH,
CASE
a.fix_price_mode
WHEN '1' THEN
'锁价模式'
WHEN '2' THEN
'后结算模式'
END AS TRANS_TYPE
FROM
jg_business_order a
LEFT JOIN jg_subject_basic b ON a.first_subject_basic_id = b.id
AND b.f_delete_mark IS NULL
LEFT JOIN base_organize c ON a.company_id = c.f_id
AND c.f_delete_mark IS NULL
LEFT JOIN base_organize d ON a.department_id = d.f_id
AND d.f_delete_mark IS NULL
LEFT JOIN base_user e ON a.f_creator_user_id = e.f_id
AND e.f_delete_mark IS NULL
LEFT JOIN jg_contract f ON a.contract_id = f.id
AND f.f_delete_mark IS NULL
WHERE a.id = #{id}
</select>
</mapper>

@ -35,9 +35,9 @@
</resultMap>
<resultMap id="deliveryOrderInfo" type="jnpf.model.deliveryorder.BusinessOrderInfoModel">
<result column="businessOrderCode" property="businessOrderCode"></result>
<result column="code" property="code"></result>
<result column="order_type" property="orderType"></result>
<result column="secondSubjectBasic" property="secondSubjectBasic"></result>
<result column="secondCustomName" property="secondCustomName"></result>
<result column="businessLineName" property="businessLineName"></result>
<result column="business_order_type" property="businessOrderType"></result>
<result column="currency" property="currency"></result>
@ -89,16 +89,13 @@
<select id="queryDeliveryOrderInfo" resultMap="deliveryOrderInfo">
SELECT
a.*,
b.code as businessOrderCode,
c.name as secondSubjectBasic,
c.name as secondCustomName,
d.name as businessLineName
FROM
jg_delivery_order a
LEFT JOIN jg_business_order b ON a.business_id = b.id
AND b.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic c ON b.second_subject_basic_id = c.id
jg_business_order a
LEFT JOIN jg_subject_basic c ON a.second_subject_basic_id = c.id
AND c.f_delete_mark IS NULL
LEFT JOIN jg_business_line d ON b.business_line_id = d.id
LEFT JOIN jg_business_line d ON a.business_line_id = d.id
AND d.f_delete_mark is null
WHERE a.f_delete_mark is null and a.id = #{id}
</select>

@ -11,6 +11,7 @@ import jnpf.model.bom.BomPagination;
import jnpf.model.businessorder.BusinessOrderPagination;
import jnpf.model.businessorder.ContractModel;
import jnpf.model.businessorder.ProductByContractModel;
import jnpf.model.yunguan.YunguanPurchaseOrderModel;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
@ -54,4 +55,7 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
BigDecimal queryCurrentDayNum(@Param("businessOrderEntity") BusinessOrderEntity businessOrderEntity);
BigDecimal queryCurrentDayNum2(@Param("businessOrderEntity") BusinessOrderEntity businessOrderEntity);
//运管采购订单接口
YunguanPurchaseOrderModel queryPurchaseOrderByYunGuan(String id);
}

@ -7,6 +7,7 @@ import java.math.BigDecimal;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import jnpf.model.yunguan.YunguanPurchaseOrderModel;
/**
* businessOrder
@ -78,4 +79,7 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
BigDecimal queryCurrentDayNum(BusinessOrderEntity businessOrderEntity);
BigDecimal queryCurrentDayNum2(BusinessOrderEntity businessOrderEntity);
//运管采购订单接口
YunguanPurchaseOrderModel queryPurchaseOrderByYunGuanInfo(String id);
}

@ -7,6 +7,7 @@ import jnpf.mapper.BusinessOrderMapper;
import jnpf.mapper.BusinessOrderProductRelationalMapper;
import jnpf.mapper.InventoryMapper;
import jnpf.mapper.VoucherMapper;
import jnpf.model.yunguan.YunguanPurchaseOrderModel;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
@ -1097,4 +1098,9 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
organize = organize.replace("]","");
return businessOrderMapper.queryPurchaseContract(businessLineId,organize);
}
@Override
public YunguanPurchaseOrderModel queryPurchaseOrderByYunGuanInfo(String id) {
return businessOrderMapper.queryPurchaseOrderByYunGuan(id);
}
}

@ -13,6 +13,7 @@ import jnpf.engine.entity.FlowTaskNodeEntity;
import jnpf.engine.service.FlowTaskNodeService;
import jnpf.engine.service.FlowTaskService;
import jnpf.exception.DataException;
import jnpf.model.yunguan.YunguanPurchaseOrderModel;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
@ -572,13 +573,12 @@ public class BusinessOrderController {
}else if(StringUtils.isNotEmpty(entity.getBusinessType()) && entity.getBusinessType().equals("2") && entity.getDeliveryType().equals("2")){
entity.setStatus("4");//销售单直送审核通过后状态改为待出库
}
JSONObject jsonObject = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/ordHead", "POST" , JsonUtil.getObjectToString(businessOrderForm));
// ActionResult actionResult = JSON.toJavaObject(jsonObject, ActionResult.class);
// boolean a = actionResult!=null && ActionResultCode.Success.getCode().equals(actionResult.getCode());
// if (!a) {
// String msg = actionResult!=null?actionResult.getMsg():"未找到接口";
// throw new WorkFlowException(msg);
// }
if (entity.getBusinessType().equals("1")) {
YunguanPurchaseOrderModel purchaseOrder = businessOrderService.queryPurchaseOrderByYunGuanInfo(id);
if (ObjectUtil.isNotEmpty(purchaseOrder)) {
JSONObject jsonObject = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj//ordHead", "POST", JsonUtil.getObjectToString(purchaseOrder));
}
}
businessOrderService.saveOrUpdate(entity);
}
}
@ -1147,6 +1147,31 @@ public class BusinessOrderController {
return ActionResult.success(businessOrderEntityList);
}
/**
*
*
* @return
*/
@Operation(summary = "销售发货凭证生成销售发货单")
@GetMapping("/createDeliveryOrderByVoucher")
public ActionResult createDeliveryOrderByVoucher(@RequestParam("businessOrderId") String businessOrderId)throws IOException{
QueryWrapper<BusinessOrderEntity> businessOrderQueryWrapper=new QueryWrapper<>();
businessOrderQueryWrapper.eq("a.id",businessOrderId);
businessOrderQueryWrapper.isNull("a.f_delete_mark");
businessOrderQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.saleOrderByDeliveryOrderInfo(businessOrderQueryWrapper);
if (businessOrderEntityList == null){
return ActionResult.fail("销售订单未审核");
}
for (BusinessOrderEntity entity: businessOrderEntityList) {
//副表数据
//子表数据
List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
entity.setBusinessOrderProductRelationalList(businessOrderProductRelationalList);
}
return ActionResult.success(businessOrderEntityList);
}
/**
*
*

@ -90,6 +90,10 @@ public class DeliveryOrderController {
private FlowTaskNodeService flowTaskNodeService;
@Autowired
private WarehousingOutboundService warehousingOutboundService;
@Autowired
private BusinessOrderService businessOrderService;
@Autowired
private BusinessCargoService businessCargoService;
/**
*
@ -555,6 +559,10 @@ public class DeliveryOrderController {
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(entity.getBusinessId());
if (ObjectUtil.isNotEmpty(businessOrderEntity)){
entity.setBusinessOrderCode(businessOrderEntity.getCode());
}
Map<String, Object> deliveryOrderMap=JsonUtil.entityToMap(entity);
deliveryOrderMap.put("id", deliveryOrderMap.get("id"));
//副表数据
@ -562,8 +570,14 @@ public class DeliveryOrderController {
List<DeliveryVoucherRelationEntity> deliveryVoucherRelationList = deliveryOrderService.getDeliveryVoucherRelationList(entity.getId());
deliveryOrderMap.put("deliveryVoucherRelationList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(deliveryVoucherRelationList)));
List<DeliveryProductRelationEntity> deliveryProductRelationList = deliveryOrderService.getDeliveryProductRelationList(entity.getId());
for (DeliveryProductRelationEntity deliveryEntity : deliveryProductRelationList){
BusinessCargoEntity businessCargoEntity = businessCargoService.getById(deliveryEntity.getCargoId());
if (ObjectUtil.isNotEmpty(businessCargoEntity)){
deliveryEntity.setCargoName(businessCargoEntity.getCargoName());
}
}
deliveryOrderMap.put("deliveryProductRelationList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(deliveryProductRelationList)));
if (StringUtil.isNotEmpty(entity.getBusinessId())){
if (entity.getDeliveryType().equals("2")){ //销售发货单详情
List<BusinessOrderInfoModel> businessOrderInfoModelList = deliveryOrderService.queryDeliveryOrderInfo(entity.getBusinessId());
deliveryOrderMap.put("businessOrderInfoList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderInfoModelList)));
}

@ -105,5 +105,7 @@ public class DeliveryOrderEntity {
private String realName;
@TableField(exist = false)
private String realNameA;
@TableField(exist = false)
private String businessOrderCode;
}

@ -93,4 +93,6 @@ public class DeliveryProductRelationEntity {
private BigDecimal notificationStorageNumber;
@TableField(exist = false)
private BigDecimal receivedQuantity;
@TableField(exist = false)
private String cargoName;
}

@ -17,14 +17,14 @@ import java.util.List;
public class BusinessOrderInfoModel {
/** 商品名称 **/
@JSONField(name = "businessOrderCode")
private String businessOrderCode;
@JSONField(name = "code")
private String code;
/** 订单编号 **/
@JsonProperty("orderType")
private String orderType;
/** 制单时间 **/
@JsonProperty("secondSubjectBasic")
private String secondSubjectBasic;
@JsonProperty("secondCustomName")
private String secondCustomName;
/** 关联销售 **/
@JsonProperty("businessLineName")
private String businessLineName;

@ -0,0 +1,70 @@
package jnpf.model.yunguan;
import com.alibaba.fastjson.annotation.JSONField;
public class YunguanPurchaseOrderModel {
/** 租户代码 **/
@JSONField(name = "COMP_CD")
private String COMP_CD;
/** 库存组织代码 **/
@JSONField(name = "INV_ORG_CD")
private String INV_ORG_CD;
/** 库存组织名称 **/
@JSONField(name = "INV_ORG_NM")
private String INV_ORG_NM;
/** 部门编码 **/
@JSONField(name = "DEPT_CD")
private String DEPT_CD;
/** 部门名称 **/
@JSONField(name = "DEPT_NM")
private String DEPT_NM;
/** 制单人 **/
@JSONField(name = "PUR_EMP_NM")
private String PUR_EMP_NM;
/** 采购订单号 **/
@JSONField(name = "ORD_NO")
private String ORD_NO;
/** 合同编号 **/
@JSONField(name = "CONTR_CD")
private String CONTR_CD;
/** 合同名称 **/
@JSONField(name = "CONTR_NM")
private String CONTR_NM;
/** 对方合同编号 **/
@JSONField(name = "RESERVE1")
private String RESERVE1;
/** 签订日期 **/
@JSONField(name = "CONTR_DT")
private String CONTR_DT;
/** 期望送达时间 **/
@JSONField(name = "DELV_DT")
private String DELV_DT;
/** 供应商编码 **/
@JSONField(name = "SUPPLIER_CD")
private String SUPPLIER_CD;
/** 供应商名称 **/
@JSONField(name = "SUPPLIER_NM")
private String SUPPLIER_NM;
/** 供应商地点编码 **/
@JSONField(name = "SUPPLIER_SITE_ID")
private String SUPPLIER_SITE_ID;
/** 供应商地点名称 **/
@JSONField(name = "RESERVE2")
private String RESERVE2;
/** 币种 **/
@JSONField(name = "CURRENCY_CD")
private String CURRENCY_CD;
/** 交货方式 **/
@JSONField(name = "DELV_MTH")
private String DELV_MTH;
/** 运输方式 **/
@JSONField(name = "TRS_MTH")
private String TRS_MTH;
/** 付款方式 **/
@JSONField(name = "PAY_MTH")
private String PAY_MTH;
/** 定价模式 **/
@JSONField(name = "TRANS_TYPE")
private String TRANS_TYPE;
}

@ -2,7 +2,8 @@
<div class="popupSelect-container">
<div class="el-select" @click="openDialog">
<el-input :placeholder="placeholder" v-model="innerValue" readonly :validate-event="false"
@mouseenter.native="inputHovering = true" @mouseleave.native="inputHovering = false" :disabled="disabled">
@mouseenter.native="inputHovering = true" @mouseleave.native="inputHovering = false"
:disabled="disabled">
<template slot="suffix">
<i v-show="!showClose"
:class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up']"></i>
@ -339,6 +340,7 @@ export default {
getDataInterfaceDataInfoByIds(this.interfaceId, query).then(res => {
const data = res.data && res.data.length ? res.data[0] : {};
this.innerValue = data[this.relationField]
debugger
if (!this.innerValue) {
this.innerValue = this.innerName;
}

@ -1094,7 +1094,7 @@ export default {
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库编码", "value": "code" }, { "label": "仓库名称", "value": "name" },],
shippingAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
shippingAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryvoucherrelationvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucherCode" }, { "label": "单据类型", "value": "documentType" }, { "label": "磅单编号", "value": "poundCode" },],
deliveryvoucherrelationdocumentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
deliveryvoucherrelationdocumentTypeProps: { "label": "fullName", "value": "id" },
@ -1104,7 +1104,7 @@ export default {
deliveryproductrelationproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
deliveryproductrelationdeliveryUnitOptions: [{ "fullName": "吨", "id": "1" }, { "fullName": "千克", "id": "2" }],
deliveryproductrelationdeliveryUnitProps: { "label": "fullName", "value": "id" },
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargo_type" }, { "label": "货区名称", "value": "cargo_name" },],
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargoType" }, { "label": "货区名称", "value": "cargo_name" },],
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
childIndex: -1,
isEdit: false,

@ -807,7 +807,7 @@ export default {
{ label: "商品规格", value: "spec" }
],
deliveryproductrelationcargoIdcolumnOptions: [
{ label: "货区类型", value: "cargo_type" },
{ label: "货区类型", value: "cargoType" },
{ label: "货区名称", value: "cargo_name" }
],
childIndex: -1,

@ -1450,7 +1450,7 @@ export default {
transactionModeProps: { "label": "fullName", "value": "id" },
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
deliveryWarehousecolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
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" }],
@ -1876,7 +1876,7 @@ export default {
if (data.flag == '采购收货凭证生成采购单') {
this.productCreate = true
this.dataForm.orderType = '3'
this.dataForm.deliveryType = '2'
this.dataForm.deliveryType = data[0].deliveryType
this.dataForm.firstSubjectBasicId = data[0].supplierId
this.dataForm.enterpriseId = data[0].customerId
var voucherIdList = {

File diff suppressed because one or more lines are too long

@ -690,7 +690,7 @@ export default {
warehouseIdcolumnOptions: [{ "label": "名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "地址详情", "value": "addressDetail" },],
deliveryproductrelationcargoIdcolumnOptions: [
{ label: "货区类型", value: "cargo_type" },
{ label: "货区类型", value: "cargoType" },
{ label: "货区名称", value: "cargo_name" }
],
businessorderproductrelationalproductIdcolumnOptions2: [

@ -1471,7 +1471,7 @@ export default {
value: "id"
},
deliveryproductrelationcargoIdcolumnOptions: [
{ label: "货区类型", value: "cargo_type" },
{ label: "货区类型", value: "cargoType" },
{ label: "货区名称", value: "cargo_name" }
],
vouchervehiclevehicleIdcolumnOptions: [
@ -1749,7 +1749,7 @@ export default {
initPurchaseData() {
const data = this.setting.selectData;
if (!data) {
return;
return
}
if (data.flag == "采购收货凭证生成收货单") {
this.dataForm.deliveryProductRelationList = [];
@ -1778,6 +1778,7 @@ export default {
this.dataForm.deliveryAddress = purchaseOrder.receiveAddress
this.dataForm.purchaseOrderInfo = res.data
purchaseOrder.businessOrderProductRelationalList.forEach(e => {
debugger
const target = this.dataForm.deliveryProductRelationList.find(p => e.productId == p.productId && e.salesMainUnitId == p.unit)
if (target) {
target.businessType = '1'

@ -1147,7 +1147,7 @@ export default {
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库编码", "value": "code" }, { "label": "仓库名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryvoucherrelationvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucherCode" }, { "label": "单据类型", "value": "documentType" }, { "label": "磅单编号", "value": "poundCode" },],
deliveryvoucherrelationdocumentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
deliveryvoucherrelationdocumentTypeProps: { "label": "fullName", "value": "id" },
@ -1157,7 +1157,7 @@ export default {
deliveryproductrelationproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
deliveryproductrelationdeliveryUnitOptions: [{ "fullName": "吨", "id": "1" }, { "fullName": "千克", "id": "2" }],
deliveryproductrelationdeliveryUnitProps: { "label": "fullName", "value": "id" },
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargo_type" }, { "label": "货区名称", "value": "cargo_name" },],
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargoType" }, { "label": "货区名称", "value": "cargo_name" },],
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
returnCargoWayOptions: [{ "fullName": "仅退款", "id": "1" }, { "fullName": "退货退款", "id": "2" }],
returnCargoWayProps: { "label": "fullName", "value": "id" },

@ -55,7 +55,8 @@
:disabled="judgeWrite('businessId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='code' field='businessId'
interfaceId="529638640356183877" :pageSize="20" :hasPage="true"
:columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
:innerName="dataForm.businessOrderCode" :columnOptions="businessIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
@ -713,9 +714,10 @@
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryproductrelationcargoId" placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-cargoId')"
propsValue="storage_area_id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='cargoName' :field="'cargoId' + scope.$index"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargoName' :field="'cargoId' + scope.$index"
interfaceId="549927783325776837" :pageSize="20"
:innerName="scope.row.cargoName"
:columnOptions="deliveryproductrelationcargoIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
@ -837,7 +839,7 @@
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('deliveryproductrelation-remark')"
prop="remark">
prop="remark" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-remark')">*</span>备注
@ -1081,7 +1083,7 @@ export default {
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库编码", "value": "code" }, { "label": "仓库名称", "value": "name" },],
shippingAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
shippingAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryvoucherrelationvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucherCode" }, { "label": "单据类型", "value": "documentType" }, { "label": "磅单编号", "value": "poundCode" },],
deliveryvoucherrelationdocumentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
deliveryvoucherrelationdocumentTypeProps: { "label": "fullName", "value": "id" },
@ -1184,6 +1186,8 @@ export default {
},
methods: {
batchNoMethod(val, val2, idx) {
debugger
this.dataForm.deliveryProductRelationList[idx].cargoId = val2.storage_area_id
this.dataForm.deliveryProductRelationList[idx].batchNo = val2.batch_number
this.dataForm.deliveryProductRelationList[idx].produceDate = val2.produce_date
},
@ -1320,12 +1324,6 @@ export default {
return
}
if (data.flag == '发货凭证生成发货单') {
data.forEach(item => {
item.voucherId = item.id
this.dataForm.deliveryProductRelationList = []
this.dataForm.deliveryVoucherRelationList.push(item)
this.dataForm.deliveryProductRelationList = item.voucherProductList
});
this.dataForm.deliveryProductRelationList = [];
data.forEach(item => {
item.voucherId = item.id;
@ -1337,7 +1335,7 @@ export default {
businessOrderId: item.businessOrderId
}
request({
url: `/api/scm/BusinessOrder/createReceiptOrderByVoucher`,
url: `/api/scm/BusinessOrder/createDeliveryOrderByVoucher`,
method: 'get',
data: purchaseId
}).then(res => {
@ -1350,8 +1348,9 @@ export default {
this.dataForm.enterpriseId = purchaseOrder.enterpriseId
this.dataForm.warehouseId = purchaseOrder.deliveryWarehouse
this.dataForm.deliveryAddress = purchaseOrder.receiveAddress
this.dataForm.purchaseOrderInfo = res.data
this.dataForm.businessOrderInfoList = res.data
purchaseOrder.businessOrderProductRelationalList.forEach(e => {
debugger
const target = this.dataForm.deliveryProductRelationList.find(p => e.productId == p.productId && e.salesMainUnitId == p.unit)
if (target) {
target.businessType = '1'
@ -1370,7 +1369,7 @@ export default {
debugger
this.$message({
type: 'error',
message: "采购订单未审核",
message: "销售订单未审核",
onClose: () => {
this.$router.go(-1)
}

@ -366,7 +366,7 @@ export default {
const deliveryType = selectData[0].deliveryType;
let stateFlag = true;
let isSaleFlag = true
let saleFlag = false
let saleFlag = true
let deliveryFlag = true;
selectData.forEach(function (item) {
if (item.flowState != 2) {
@ -434,10 +434,14 @@ export default {
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
let deliveryFlag = true;
selectData.forEach(function (item) {
if (item.flowState != 2) {
stateFlag = false;
}
if (item.deliveryType == 1) {
deliveryFlag = false;
}
});
if (!stateFlag) {
this.$message({
@ -447,6 +451,14 @@ export default {
})
return
}
if (!deliveryFlag) {
this.$message({
type: 'error',
message: '凭证配送方式需为直送',
duration: 1500,
})
return
}
let isTransferFlag = false
let saleFlag = false
selectData.every(function (item) {

@ -1079,7 +1079,7 @@ export default {
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库编码", "value": "code" }, { "label": "仓库名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryvoucherrelationvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucherCode" }, { "label": "单据类型", "value": "documentType" }, { "label": "磅单编号", "value": "poundCode" },],
deliveryvoucherrelationdocumentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
deliveryvoucherrelationdocumentTypeProps: { "label": "fullName", "value": "id" },
@ -1089,7 +1089,7 @@ export default {
deliveryproductrelationproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
deliveryproductrelationdeliveryUnitOptions: [{ "fullName": "吨", "id": "1" }, { "fullName": "千克", "id": "2" }],
deliveryproductrelationdeliveryUnitProps: { "label": "fullName", "value": "id" },
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargo_type" }, { "label": "货区名称", "value": "cargo_name" },],
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargoType" }, { "label": "货区名称", "value": "cargo_name" },],
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
childIndex: -1,
isEdit: false,

@ -1106,7 +1106,7 @@ export default {
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库编码", "value": "code" }, { "label": "仓库名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryvoucherrelationvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucherCode" }, { "label": "单据类型", "value": "documentType" }, { "label": "磅单编号", "value": "poundCode" },],
deliveryvoucherrelationdocumentTypeOptions: [{ "fullName": "收货凭证", "id": "1" }, { "fullName": "发货凭证", "id": "2" }],
deliveryvoucherrelationdocumentTypeProps: { "label": "fullName", "value": "id" },
@ -1116,7 +1116,7 @@ export default {
deliveryproductrelationproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
deliveryproductrelationdeliveryUnitOptions: [{ "fullName": "吨", "id": "1" }, { "fullName": "千克", "id": "2" }],
deliveryproductrelationdeliveryUnitProps: { "label": "fullName", "value": "id" },
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargo_type" }, { "label": "货区名称", "value": "cargo_name" },],
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargoType" }, { "label": "货区名称", "value": "cargo_name" },],
returnCargoWayOptions: [{ "fullName": "仅退款", "id": "1" }, { "fullName": "退货退款", "id": "2" }],
returnCargoWayProps: { "label": "fullName", "value": "id" },
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],

@ -704,7 +704,7 @@ export default {
{ label: "商品规格", value: "spec" }
],
deliveryproductrelationcargoIdcolumnOptions: [
{ label: "货区类型", value: "cargo_type" },
{ label: "货区类型", value: "cargoType" },
{ label: "货区名称", value: "cargo_name" }
],
childIndex: -1,

@ -1358,7 +1358,7 @@ export default {
transactionModeProps: { "label": "fullName", "value": "id" },
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
deliveryWarehousecolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "address_type" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
deliveryAddresscolumnOptions: [{ "label": "业务类型", "value": "addressType" }, { "label": "国家", "value": "country" }, { "label": "详细地址", "value": "addressDetail" },],
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" }],

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save