|
@@ -18,32 +18,37 @@
|
|
|
@resetColumn="resetColumn"
|
|
|
:cell-style="cellStyle"
|
|
|
>
|
|
|
- <template slot-scope="{ row }" slot="updateUser">
|
|
|
- <span>{{ row.updateUserName }}</span>
|
|
|
+ <template slot="corpIdSearch">
|
|
|
+ <crop-select v-model="search.corpId" corpType="KH"></crop-select>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row, index }" slot="menu">
|
|
|
- <el-button type="text" size="small" @click.stop="editOpen(row, 1)">
|
|
|
- 查看
|
|
|
- </el-button>
|
|
|
- <el-button type="text" size="small" @click.stop="editOpen(row, 2)">
|
|
|
- 编辑
|
|
|
- </el-button>
|
|
|
- <el-button type="text" size="small" @click.stop="rowDel(row, index)">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <template slot="businesDateSearch">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="search.businesDate"
|
|
|
+ type="daterange"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :default-time="['00:00:00', '23:59:59']"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
</template>
|
|
|
+ <!-- <template slot-scope="{ row }" slot="corpId">
|
|
|
+ <span>{{ row.corpsName }}</span>
|
|
|
+ </template> -->
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, remove } from "@/api/salaryManagement/primarySchool";
|
|
|
+import { getList } from "@/api/statisticAnalysis/salesProfit";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
+ search: {},
|
|
|
dataList: [],
|
|
|
loading: false,
|
|
|
isShow: true,
|
|
@@ -54,7 +59,7 @@ export default {
|
|
|
},
|
|
|
option: {
|
|
|
searchShow: true,
|
|
|
- searchMenuSpan: 16,
|
|
|
+ searchMenuSpan: 24,
|
|
|
align: "center",
|
|
|
searchSpan: 8,
|
|
|
border: true,
|
|
@@ -67,94 +72,79 @@ export default {
|
|
|
searchLabelWidth: 100,
|
|
|
searchIcon: true,
|
|
|
searchIndex: 2,
|
|
|
+ menu: false,
|
|
|
column: [
|
|
|
{
|
|
|
label: "合同号",
|
|
|
- prop: "",
|
|
|
+ prop: "orderNo",
|
|
|
overHidden: true,
|
|
|
width: 100,
|
|
|
search: true
|
|
|
},
|
|
|
{
|
|
|
label: "客户名称",
|
|
|
- prop: "",
|
|
|
+ prop: "corpId",
|
|
|
overHidden: true,
|
|
|
width: 100,
|
|
|
- search: true
|
|
|
+ search: true,
|
|
|
+ formatter: row => {
|
|
|
+ return row.corpsName;
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: "合同日期",
|
|
|
- prop: "",
|
|
|
+ prop: "businesDate",
|
|
|
type: "date",
|
|
|
- valueFormat: "yyyy-MM-dd",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
overHidden: true,
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同日期开始",
|
|
|
- prop: "DateStart",
|
|
|
- type: "date",
|
|
|
- valueFormat: "yyyy-MM-dd",
|
|
|
search: true,
|
|
|
- hide: true,
|
|
|
- showColumn: false,
|
|
|
- span: 8
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同日期结束",
|
|
|
- prop: "DateEnd",
|
|
|
- type: "date",
|
|
|
- valueFormat: "yyyy-MM-dd",
|
|
|
- search: true,
|
|
|
- hide: true,
|
|
|
- showColumn: false,
|
|
|
- span: 8
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "起运港",
|
|
|
- prop: "",
|
|
|
+ prop: "portOfLoad",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "目的港",
|
|
|
- prop: "",
|
|
|
+ prop: "portOfDestination",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "运输条款",
|
|
|
- prop: "",
|
|
|
+ prop: "transport",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "采购报价",
|
|
|
- prop: "",
|
|
|
+ prop: "purchasePrice",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "销售金额",
|
|
|
- prop: "",
|
|
|
+ prop: "amount",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "产品毛利",
|
|
|
- prop: "",
|
|
|
+ prop: "grossProfit",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "产品利率",
|
|
|
- prop: "",
|
|
|
+ prop: "grossProfitRate",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
label: "单票利润",
|
|
|
- prop: "",
|
|
|
+ prop: "singleTicketMargin",
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
}
|
|
@@ -168,6 +158,11 @@ export default {
|
|
|
},
|
|
|
//点击搜索按钮触发
|
|
|
searchChange(params, done) {
|
|
|
+ if (params.businesDate) {
|
|
|
+ params.contractStartDate = params.businesDate[0];
|
|
|
+ params.contractEndDate = params.businesDate[1];
|
|
|
+ }
|
|
|
+ delete params.businesDate;
|
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page, params);
|
|
|
done();
|
|
@@ -207,23 +202,6 @@ export default {
|
|
|
};
|
|
|
this.isShow = false;
|
|
|
},
|
|
|
- rowDel(row, index, done) {
|
|
|
- this.$confirm("确定删除数据?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- remove(row.id).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "删除成功!"
|
|
|
- });
|
|
|
- this.onLoad(this.page, this.search);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
goBack() {
|
|
|
this.detailData = this.$options.data().detailData;
|
|
|
this.isShow = true;
|